How to Add a Right Click/Pop-up Mouse Menu.
Step by Step on how to How to Add a Right Click/Pop-up Mouse Menu to your project.
AI
AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Source Code
<div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber1"> <tr> <td width="100%" colspan="2" valign="top"> <p align="center"><b><font size="4">How to Add a Right Click/Pop-up Mouse Menu.</font></b></td> </tr> <tr> <td width="8%" valign="top" nowrap> </td> <td valign="top"> </td> </tr> <tr> <td width="8%" valign="top" nowrap><u>Step 1:</u></td> <td valign="top">Start a New Standard .EXE Project</td> </tr> <tr> <td width="8%" valign="top" nowrap> </td> <td valign="top"> </td> </tr> <tr> <td width="8%" valign="top" nowrap><u>Step 2:</u></td> <td valign="top">Click on Tools > Menu editor (Opens Menu Editor Dialog)</td> </tr> <tr> <td width="8%" valign="top" nowrap> </td> <td valign="top"> </td> </tr> <tr> <td width="8%" valign="top" nowrap><u>Step 3:</u></td> <td valign="top">Put 'Menu1' in the Caption then put 'MenuOne' for the Name. Click the 'Next' Button.</td> </tr> <tr> <td width="8%" valign="top" nowrap> </td> <td valign="top"> </td> </tr> <tr> <td width="8%" valign="top" nowrap><u>Step 4:</u></td> <td valign="top">Put 'Test1' in the Caption then put 'TestOne' for the Name. Now click on the arrow that is pointing right (You should see four dots next to Test1). Then click the 'OK' button.</td> </tr> <tr> <td width="8%" valign="top" nowrap> </td> <td valign="top"> </td> </tr> <tr> <td width="8%" valign="top" nowrap><u>Step 5:</u></td> <td valign="top">Go to the Visual Basic Menu and click on View > Code and add this:</td> </tr> <tr> <td width="8%" valign="top" nowrap> </td> <td valign="top"><font color="Green"> Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) <br> If Button = 2 Then <br> Form1.PopupMenu MenuOne <br> End If <br> End Sub</font></td> </tr> <tr> <td width="8%" valign="top" nowrap> </td> <td valign="top"> </td> </tr> <tr> <td width="8%" valign="top" nowrap><u>Step 6:</u></td> <td valign="top">Click on Run > Start (or press the 'F5' button on the keyboard).</td> </tr> <tr> <td width="8%" valign="top" nowrap> </td> <td valign="top"> </td> </tr> <tr> <td width="8%" valign="top" nowrap><i>Notes:</i></td> <td valign="top"><i>Button 1 = Left Mouse Button<br> Button 2 = Right Mouse Button<br> Button 3 = Explore Left Mouse Button<br> Button 4 = Middle Mouse Button<br> Button 5 = Explore Right Mouse Button</i></td> </tr> </table> </center> </div> <p> </p>
Original Comments (3)
Recovered from Wayback Machine