Thursday, May 26, 2016

Right Click Event VB.net



Hey welcome back for more one tutorial. Today I will show a simple to crte a Right Click Event.
As you can see, there is no an "automatic" Right Click Event so, when you want to make it you have to use other methods. I will present the most simple.
1- Open your Visual Studio2- Crte a project in VB.net3- Add for exemple a button or any other control than you want
Now let´s go to the . This contains 2 steps.4.1- Crte a Mouse_Up Event4.2- Detects if when the user click in the button, he used the right button of the mouse.
So, double-click in the button (or just open the form1.vb file). Crte the Mouse_Up EventPaste the following :
If e.Button = MouseButtons.Right Then MsgBox("Right Click :D") End If

No comments:

Post a Comment