stu nicholls dot com | menu - Professional dropdown #3

Handling Mouse Events

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
If e.Button = Windows.Forms.MouseButtons.Left Then
TextBox1.Text = "mouse down at " + CStr(e.X) + "," + CStr(e.Y)
End If
End Sub
Private Sub Form1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.MouseEnter
TextBox1.Text = "Mouse Entered"
End Sub
Private Sub Form1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.MouseLeave
TextBox1.Text = "Mouse left"
End Sub
End Class



Performing Data Validation<< Previous    Next>>Keyoard Event


comments powered by Disqus
click here
Footer1