Click to See Complete Forum and Search --> : disable default righ click menu on txtbox


rgreen2002
January 10th, 2003, 07:59 AM
How do you stop the default right click menu appearing on a textbox control.

I'm trying to use a Magic PopupMenu and now the magic popup and now both the magic menu and the default (cut, copy, paste, delete, select all) menu appear at the same time.

http://www.dotnetmagic.com/index.html

Russ

rgreen2002
January 13th, 2003, 04:37 PM
You can derive your textbox and override WndProc ignoring right button down.

Public Class MyTextBox
Inherits TextBox

Protected Overrides Sub WndProc(ByRef m As
System.Windows.Forms.Message)
If m.Msg = &H204 Then ' WM_RBUTTONDOWN
Return 'ignore it
End If
MyBase.WndProc(m)
End Sub 'WndProc
End Class 'MyTextBox

amrendrakr
June 11th, 2003, 02:30 AM
On right click of mouse pop up menu appears, How to disable to paste/ cut/ item from that pop up menu?


regards
-Amrendra