(13-09-16, 05:57 PM)أبو عمر كتب :Add ContextMenuStrip
add some items like file open save etc..
just copy this code
run your app
hid c key or right click on form
Good luck
PHP كود :
Private Sub Form1_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
If e.KeyChar = "c" Then
ContextMenuStrip1.Show(Me.Width, Me.Height)
End If
End Sub
Private Sub Form1_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Cursor.Position)
End If
End Sub
جاري التجريب === Thank You
(13-09-16, 05:57 PM)أبو عمر كتب :Add ContextMenuStrip
add some items like file open save etc..
just copy this code
run your app
hid c key or right click on form
Good luck
PHP كود :
Private Sub Form1_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
If e.KeyChar = "c" Then
ContextMenuStrip1.Show(Me.Width, Me.Height)
End If
End Sub
Private Sub Form1_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Cursor.Position)
End If
End Sub
اخي الكريم شكرا لك لي الرد والمساعد بس ياريت توضح الكود لاني جديد واحتاج الا التعليم -- هل انشئ زر او لا؟ لم افهم = e.Button + e.KeyChar