0

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

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by challenger485
0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.