Thursday, 29 March 2018

Menu and Popup Menu in VB




Private Sub Command1_Click()
End
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then
PopupMenu mnucolors
End If
End Sub

Private Sub mnublue_Click()
Shape1.FillColor = vbBlue
End Sub

Private Sub mnuclear_Click()
Shape1.FillColor = vbMenuBar

End Sub

Private Sub mnugreen_Click()
Shape1.FillColor = vbGreen

End Sub

Private Sub mnumagenta_Click()
Shape1.FillColor = vbMagenta

End Sub

Private Sub mnured_Click()
Shape1.FillColor = vbRed

End Sub

No comments:

Post a Comment

Note: only a member of this blog may post a comment.