Advertisement
smashapps

Form Size and Mouse Position

May 14th, 2011
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.  
  3.     Private Sub Form1_Resize(sender As System.Object, e As System.EventArgs) Handles MyBase.Resize
  4.         ToolStripStatusLabel1.Text = "Size " & Me.Size.Width & " x " & Me.Size.Height & " y px"
  5.     End Sub
  6.  
  7.     Private Sub Form1_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
  8.         ToolStripStatusLabel2.Text = "Mouse Position: " & e.X & " x " & e.Y & " y px"
  9.     End Sub
  10. End Class
  11.  
  12. 'Note
  13. 'you need a status strip, and two status labels
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement