954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Mouse click coordinate in text file

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

challenger485
Newbie Poster
2 posts since Jul 2010
Reputation Points: 10
Solved Threads: 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

challenger485
Newbie Poster
2 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: