Get the Real-time Axis Position of the Mouse
The program is very easy, it enables the genuine position of the mouse and display the X-axis and Y-axis in real time. You only need a Form, a Label and a Timer.
Label Font size – 27.75
Code:
You need to move the mouse to change the value of each axis position.
Label Font size – 27.75
Code:
Public Class frmMousePosition ‘Name of your formFinal Output:
Private Sub frmMousePosition_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadTimer1.Start() ‘Enables the timer during form loadEnd Sub‘Displays the value of X and Y through navigation of the mousePrivate Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.TickDim mousepoint As Point = MousePositionLabel1.Text = mousepoint.ToStringEnd SubEnd Class
You need to move the mouse to change the value of each axis position.
Get the Real-time Axis Position of the Mouse
Reviewed by code-dev
on
4:22 PM
Rating:
No comments: