-
Is there any way to move the mouse over a BMP file in my VB app and see what color it is over?
I am using one of those ActiveX components to shape the form to a bitmap image with a transparent color. I want the user to select the color from the bitmap loaded in a picturebox in a seperate form.
Any way of doing this? can someone show me a sample code line for this?
I would greatly appreciate it!
Warren
-
Theres a method, point(x,y) for pictureboxes, there's an api called getpixel(x,y) for device contexts.
-
Here is Vb-World's search results for GetPixel, I'm sure you will find what your looking for :rolleyes:.
-
MouseDown
The MouseDown event has the X,Y coordinates of the mouse pointer as arguments. So in the MouseDown Event of the picturebox you can say:
Code:
Dim SelectedColor As Long
SelectedColor = picWhatever.Point(X, Y)
Shrog