ControlDesigner OnMouseDragMove only called once?

S

Seth

I am playing with overriding the ControlDesigner OnMouseDragMove. But for
some reason it only appears to get called when a control just begins its
drag. I was anticipating it to be called for every movement of the mouse
during the drag. Am I missing something so that this method is only called
once? Is there another method I should be using that will be called for
each movement of the mouse?
 
S

Seth

Nothing too exciting:

[System.Security.Permissions.PermissionSet(
System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust" )]
public class PadDesigner : System.Windows.Forms.Design.ControlDesigner
{
protected override void OnMouseDragMove( int x, int y )
{
System.Diagnostics.Trace.WriteLine( string.Format( "{0}, {1}", x, y ) );
base.OnMouseDragMove( x, y );
}
}
 
B

Bryan Phillips

It happens the same way for me. I drag and it is called 3 or 4 times
and quits. I overrode the WndProc and checked for the WM_MOUSEMOVE and
WM_NCMOUSEMOVE messages and they seem to stop too. It looks like the
Windows message just stop.

--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com



Nothing too exciting:

[System.Security.Permissions.PermissionSet(
System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust" )]
public class PadDesigner : System.Windows.Forms.Design.ControlDesigner
{
protected override void OnMouseDragMove( int x, int y )
{
System.Diagnostics.Trace.WriteLine( string.Format( "{0}, {1}", x, y ) );
base.OnMouseDragMove( x, y );
}
}

Bryan Phillips said:
That is the correct method. Can you post some sample code?
 
J

Jeff Johnson

Same problem here: A few calls then nothing.

Even worse: OnMouseDragEnd not called unless user didn't move the control!

Worst of all: these stupid Web forums that are echoing their posts to
newsgroups and providing NO context.
 

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