PreProcessMessage

  • Thread starter Just close your eyes and see
  • Start date
J

Just close your eyes and see

Hi All
i am trying to override the PreProcessMessage for the form
and i am using this code

public override bool PreProcessMessage(ref Message msg)
{
switch (msg.Msg)
{
case WM_RBUTTONDOWN: return true;
default: return base.PreProcessMessage(ref msg);
}
}

but this code never been called
i am wondering, why ?
 
N

Nicholas Paldino [.NET/C# MVP]

PreProcessMessage is used for keyboard or input messages before they are
dispatched. This is used for things like accelerator keys and the like, not
for mouse clicks.

You should override WndProc if you want to process this message.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top