You could override WndProc of your control, look for WM_RBUTTONDOWN and
ignore it by not calling the base class. Call base class for all other
messages. Something like this(c# version):
protected override void WndProc(ref System.Windows.Forms.Message m)
{
if(m.Msg == 0x204) // WM_RBUTTONDOWN
{
return; // Dont call the base class here
}
base.WndProc(ref m); // pass it on to base class
}
_____________
Ajay Kalra (MVP - VC++)
aj*******@yahoo.com
"Maurice Mertens" <hm*****@nospam.nospam> wrote in message
news:Xn****************************@194.109.133.13 3...
Hi all,
I want to cancel the right-mouse click on a control in VB.NET. Does anyone
know how to do this?
--
Met vriendelijke groet / With regards / Saludos,
Moviat Automatisering
Maurice Mertens
mauricem@moviat_KillSpamWordForEMail.nl
tel: +31 162 470 534
fax: +31 162 470 502