Hi

Can anyone tell me how can i track mouse click. I am developing a program to track mouse click and I particularly want mouse click coordinate in output file. can anyone help me to develop this program.

Thanks a lot

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)- Handles MyBase.Load
lblx.ForeColor = Color.Blue
lbly.ForeColor = Color.Blue
lblinside.ForeColor = Color.LightGray
End Sub

Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As -System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
lblx.Text = e.X
lbly.Text = e.Y
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)- Handles Button1.Click
Dim FILE_NAME As String = "C:\test2.txt"

If System.IO.File.Exists(FILE_NAME) = True Then
Dim objWriter As New System.IO.StreamWriter(FILE_NAME, True)
objWriter.Write(lblx.Text & lbly.Text)
objWriter.Close()
MsgBox("Text written to file")
Else
MsgBox("File Does Not Exist")
End If
End Sub
End Class
=============================================

This is the code for mouse movement in VB.net. Here I am getting mouse position in pixel. However, I want output in mm. I also want to add the time stamp for each mouse position. I appreciate if you help me to code this program.
thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.