Mouse Coordinates
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
4 posts
Page 1 of 1
Credits to macHard for helping me a while ago on how to do it|
-Make a new project with a 1 label on it
-add a timer , make sure its enabled with an interval of 3 doesnt really matter
-add this code to the timer and your done
-Make a new project with a 1 label on it
-add a timer , make sure its enabled with an interval of 3 doesnt really matter
-add this code to the timer and your done

Code: Select all
Dim MousePosition As Point
MousePosition = Cursor.Position
Label1.Text = "Mouse Position: " & MousePosition.ToString
This is what can also be used as a mouse recorder with very little coding. +rep
You can also use while(true) instead of a timer, in C# your application freezes if you do that but in vb not lol Im not sure why
Axel wrote:You can also use while(true) instead of a timer, in C# your application freezes if you do that but in vb not lol Im not sure whyThat's why because it goes to a never ending loop, the program waits for it to end (which in this case will never happen)
To make it work with that, it would probably only work with multi-threading. To make it not lag, I would add a sleep for in example 1 second(s)
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023