|
-
Nov 20th, 2000, 12:46 PM
#1
Thread Starter
Frenzied Member
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
-
Nov 20th, 2000, 01:07 PM
#2
transcendental analytic
Theres a method, point(x,y) for pictureboxes, there's an api called getpixel(x,y) for device contexts.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 20th, 2000, 01:31 PM
#3
Here is Vb-World's search results for GetPixel, I'm sure you will find what your looking for .
-
Nov 20th, 2000, 01:39 PM
#4
Addicted Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|