Skip to main content

Posts

Showing posts from 2011

VB.Net code to control mouse movement and click

VB.Net code to perform mouse movements and clicks. Include references at the top of the class code file to Windows interface libraries: Public Declare Auto Function SetCursorPos Lib "User32.dll" (ByVal X As Integer, ByVal Y As Integer) As Integer Public Declare Auto Function GetCursorPos Lib "User32.dll" (ByRef lpPoint As Point) As Integer Public Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer) Some fixed constant values will be needed, so include these as basic names: Public Const MOUSEEVENTF_LEFTDOWN = &H2 Public Const MOUSEEVENTF_LEFTUP = &H4 Public Const MOUSEEVENTF_MIDDLEDOWN = &H20 Public Const MOUSEEVENTF_MIDDLEUP = &H40 Public Const MOUSEEVENTF_RIGHTDOWN = &H8 Public Const MOUSEEVENTF_RIGHTUP = &H10 Public Const MOUSEEVENTF_MOVE = &H1 This

I Don't Need No Stinking Antivius -- But Will You Please Get It?

People often ask me what antivirus I use. The answer is that I don't use any AV. I typically know the metrics on what my programs are doing, so viruses aren't something I tend to get. Don't get me wrong; there are a few times I've been exposed to malware, but I had put myself in a risky position and knew what to expect from it. Downloading music or alternative software are both prime examples of such situations. When viruses run amok throughout a computer system, it’s imperative to know how to seek and destroy the many tentacles with which it can take hold. It's actually kind of fun not only to kill, but to observe the hacking creativity (I have a small collection of well designed viruses). There are some nasty programs out there. It’s important to act very quickly upon getting infected with a virus or malware because it could start transferring private files to the net almost immediately. To make matters worse, once a single piece of malware makes it through, i