Live Chat Icon For mobile
Live Chat Icon

How do I get Mouse Messages on my Control during design-time?

Platform: WinForms| Category: Custom Designers

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


protected override /*ControlDesigner*/ bool GetHitTest(Point point)
{
	if(this.NeedMouseDown(point))
		return true;
	else
		return false;
}

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.