Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ControlDesigner OnMouseDragMove only called once?

1 view
Skip to first unread message

Seth

unread,
Jan 16, 2007, 1:44:49 PM1/16/07
to
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?


Bryan Phillips

unread,
Jan 16, 2007, 8:31:43 PM1/16/07
to
That is the correct method. Can you post some sample code?

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

"Seth" <a...@b.com> wrote in message
news:1a6dnUIEk9y_gDDY...@speakeasy.net:

Seth

unread,
Jan 16, 2007, 9:07:18 PM1/16/07
to

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" <bphi...@nospam.spamcop.net.spammenot> wrote in message
news:ezRl$cdOHH...@TK2MSFTNGP02.phx.gbl...

Bryan Phillips

unread,
Jan 16, 2007, 10:12:56 PM1/16/07
to
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

"Seth" <a...@b.com> wrote in message

news:yYOdnZaAB8lEGTDY...@speakeasy.net:

Serge Wautier

unread,
Dec 10, 2009, 4:42:26 AM12/10/09
to
Same problem here: A few calls then nothing.

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

From http://www.developmentnow.com/g/29_2007_1_0_0_913705/ControlDesigner-OnMouseDragMove-only-called-once.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/

Jeff Johnson

unread,
Dec 10, 2009, 4:45:29 PM12/10/09
to
"Serge Wautier" <se...@wautier.net> wrote in message
news:d7808469-8ffb-4a11...@developmentnow.com...

> 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.


0 new messages