|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VB.net app to run in the backgroundhello i have made a program that record to file mouse moves .
but to record it its use : Mouse_Move sub and thats works just my form is visible i want thats record even if my form is "me.hide()" can i do that ? Hello Link,
If I remember correctly the Win32 API is called GetCursorPosition(). -Boo Show quoteHide quote > hello i have made a program that record to file mouse moves . > but to record it its use : > Mouse_Move > sub and thats works just my form is visible > i want thats record even if my form is "me.hide()" > can i do that ? I'm guessing you'll want to record mouse clicks too. Since your form
doesn't have focus, it doesn't receive mouse events; therefore you have to poll the "key state" of the mouse buttons repeatedly and rapidly, else you'll miss clicks: Const VK_LBUTTON = &H1 ' left-mousebutton Const VK_RBUTTON = &H2 ' right-mousebutton Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Int32) As Int32 Function MyGetKeystate(ByVal WhichKey As Int32) As Boolean ' Returns the status of a key. ' Pass one of the VK_* constants defined above, or any key value. If GetAsyncKeyState(WhichKey) And &H8000 Then MyGetKeystate = True End Function Function LeftButton() As Boolean LeftButton = MyGetKeystate(VK_LBUTTON) End Function Function Get RightButton() As Boolean RightButton = MyGetKeystate(VK_RBUTTON) End Function It should also be possible to hook into the Windows mouse handlers and avoid polling, but that's beyond me.
Trouble with mouse click
vb with odbc File handling in VB How to Load string into mshtml object? what method to use to add 1 day to a date (hotel reservation for one night by clicking on calender) How to reference Webform textbox controls in a for next loop Excel problem: Cant hide column. PLEASE HELP - Executable properties - right click data binding and rejectchanges how to compare two date variables? |
|||||||||||||||||||||||