Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

How do I get mouse messages on a custom control during design-time?

The design-time will forward the MouseEnter and MouseLeave messages to your control by default. The MouseMove message is blocked by the designer. You can get MouseDown and MouseUp messages in your control if you override GetHitTest method in your designer and return true, as follows:

protected override bool GetHitTest( Point point ) 
{ 
  return NeedMouseDown( point );
}

Contributed from George Shepherd's Windows Forms FAQ



Page view counter