Basic Color
![]() |

Using Visual Basic 2008, how do you make your mouse pointer move to a specific color on the screen?
I want to know how to make a program in Visual Basic 2008 that moves your mouse pointer to a specific location on the screen, chosen by the pixel color of that location.
Where does the "Grapes.jpg" come in and what is it?
Use the GetPixel api to get the color of a pixel (might be different if using .NET do a search in MSDN)
Dim myBitmap As New Bitmap("Grapes.jpg")
Dim pixelColor As Color = myBitmap.GetPixel(50, 50)
then test to see if that pixel is the color you are looking for and if it is use the same coordinates used in GetPixel to set the cursor position
/* Non .net way */
Dim retval As Long ' return value
retval = SetCursorPos(50, 50)
/* End non .net way */
/* .NET Way */
Me.Cursor = New Cursor(Cursor.Current.Handle)
Cursor.Position = New Point(50, 50)
Cursor.Clip = New Rectangle(Me.Location, Me.Size)
/* .NET Way */
GetPixel, SetCursorPos, and Point constructor use X coord as its first argument and Y coord as its second
Grapes.jpg is just an example, you would need to get some way of getting the screen data to do what you want, but not sure exactly how
Photoshop Tutorial: Basic Color Correction
Tags: basic color guard moves, basic color myspace layouts, basic color theory, basic color wheel, basic colors, basic colors list, color, design, inspiration, reference, tools, webdesign

















































