Posted by : Unknown Saturday, 18 January 2014


Format


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



Contoh

Seandainya anda membuat menu seperti gambar 1 lalu anda buat coding seperti dibawah bawah ini:


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


maka yg akan muncul seperti Gambar 2
Gambar 2
Gambar 1

Source Code


Leave a Reply

Subscribe to Posts | Subscribe to Comments

Popular Post