well i make a program that get mouse X and Y each time the mouse moves on the form
and write it to file ;
i want to make that program " in the background" that still get X and Y but user wont see it he can still work and program still record ;
how can i make thats

makeing background form
Emre Çetinkaya
its very helpful but i dont get it how its gets clicks
Public Function InstallHook() As Boolean
If _mouseHook = IntPtr.Zero Then
_mouseProc = New CallBack(AddressOf MouseHookProc)
_mouseHook = SetWindowsHookExW(WH_MOUSE_LL, _mouseProc, GetModuleHandleW(IntPtr.Zero), 0)
End If
Return _mouseHook <> IntPtr.Zero
End Function
thats just over what i know in VB.net (argh) i have to learn how to use Declare Functions and thats DLL's
well how ever i want to gets click from that function thats gets mouse clicks 2
EDIT :
well i have found that module
http://www.developer.com/net/net/print.php/11087_2193301_3
its supose to Hook the Keybored and the Mouse but how can i use it some1 can take a look
Tnx Any way
Gurmeet
i mean i want it record but user can still work .
PsyCadelik
for doing mouse clicks, you may well need to do "hooks", this is not what you initially asked however ;-)
try the link supplied and see what happens, I'll also see what I can come up with
zwp
Boulderdude
I don't think a Windows Service would be possible for this - which runs in the background btw.
I guess you can hide the application in systray notification area Would this be a possibility You can hide your application in the background using Me.Hide() but perhaps you like the option to show the application
J.B. III
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
msgbox(e.X & " " & e.Y)
'thats doesnt work when the from is "Me.Hide()"
End Sub
Edit :
well i will try Tnx
oh well thats work both way work good !
tnx
another lil qustion :
can i convert Bitamp to String and convert it back
shmulik_segal
i doesnt really understand that Declare and Dlls
how can i use it to get Mouse Clicks
allpdoff
and thats doesnt work if i use "me.hide"
anyway thx for posting
battlex
Soby
In order for your application to track the mouse outside of the application itself...you will need to provide a "Hook"...look at nobugz solution in this thread:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=698653&SiteID=1
Dee_dotnet_79
you dont need to do a hook at all. It works even if the application is not in focus but hidden. I've done this many times and doing it just now.
I placed a label on the form
I placed a timer on the form
I set the timer interval to be 100 milliseconds (to constantly show the mouse position) and enabled it so when we start the app it will kick in straight away.
on the timer tick event, I did:
Me.Label1.Text = Cursor.Position.ToString()
I ran the application
it showed me the x and y co-ords of the mouse pointer even if the app was not in focus.