Colors Popup Sample


The Colors Popup sample application shows a popup menu on the form. This is a very simple program that shows the use of PopopMenu method. 



                                                         >> DOWNLOAD 



Screenshot:

Screenshot of the program, Colors popup


















Code:

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()
    Form1.BackColor = vbBlue
End Sub
________________________________________________
Private Sub mnuGreen_Click()
    Form1.BackColor = vbGreen
End Sub
________________________________________________
Private Sub mnuRed_Click()
    Form1.BackColor = vbRed
End Sub
________________________________________________
Private Sub mnuWhite_Click()
    Form1.BackColor = vbWhite
End Sub
________________________________________________
Private Sub mnuYellow_Click()
    Form1.BackColor = vbYellow
End Sub