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.
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
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
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)
MsgBox("Text written to file")
MsgBox("File Does Not Exist")
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.