0

can anyone tell me examples of 3 mouse events(which will be easiest to create) and 3 keyboard events(which will be easiest to create) please! ASAP

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by Hilal2009
0

There are multiple Mouse events.

Here is the order that the click events fire in.

MouseDown
MouseClick
MouseUp

Examples:

Private Sub MouseDownMe(sender as object, e as MouseEventArgs) handles Me.MouseDown
        MsgBox("You have clicked the mouse.")
End Sub

Private Sub MouseClickMe(sender as object, e as MouseEventArgs) handles Me.MouseClick
If e.Button = Windows.Forms.MouseButton.Left Then
    MsgBox("You have clicked the left mouse button.")
End If
End Sub


Private Sub MouseUpMe(sender as object, e as MouseEventArgs) handles Me.MouseUp
    MsgBox("You have released the mouse button."
End Sub

Edited by Begginnerdev: edit

0

For the case of keyboard events you may use this
on keyUp
on keyDown
on keyPress

I would like to show you the real codes and even some examples on that, but the current PC that I'm using rightnow doesn't have VB.NET installed. If possible tomorrow I will show you my friend.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.