Hey Marco, sorry for ask but can you explain a bit this code of yours?
I mean, why all this api`s Calls? Are they needed?
Thanks
const vbKeyLButton=1``left mouse button
Declare GetPixel as "GetPixel" of "gdi32"
hdc As Long
x As Long
y As Long
result As Long
end declare
declare getdesk as "GetDesktopWindow" of user32
result as integer
end declare
declare getdc as "GetWindowDC" of user32
handle as integer
result as integer
end declare
Declare GetAsyncKeyState as "GetAsyncKeyState" of "user32"
vKey As Long
result As Integer
end declare
GetPixel app
GetPixel app
getpixel gets the color of a place on the screen, desktop, not only the form that is active.
getdesktopwind finds the window handle of the desktop to use in combination with getdc. this dc (device context) is used with getpixel.
The above is used to get a pixelcolor at any place of the desktop. Also outside the application form or inside a third party application form.
Getsynckey is only used for pressing the mouse button, because a mousedown event will only work inside the aplication form.
So they are all needed to get a pixelcolor anywhere at the desktop.
i hope this will explain it. Best regards
getdesktopwind finds the window handle of the desktop to use in combination with getdc. this dc (device context) is used with getpixel.
The above is used to get a pixelcolor at any place of the desktop. Also outside the application form or inside a third party application form.
Getsynckey is only used for pressing the mouse button, because a mousedown event will only work inside the aplication form.
So they are all needed to get a pixelcolor anywhere at the desktop.
i hope this will explain it. Best regards