PC Review


Reply
Thread Tools Rate Thread

ControlDesigner OnMouseDragMove only called once?

 
 
Seth
Guest
Posts: n/a
 
      16th Jan 2007
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?


 
Reply With Quote
 
 
 
 
Bryan Phillips
Guest
Posts: n/a
 
      17th Jan 2007
That is the correct method. Can you post some sample code?

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



"Seth" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed):

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


 
Reply With Quote
 
Seth
Guest
Posts: n/a
 
      17th Jan 2007

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" <(E-Mail Removed)> wrote in message
news:ezRl$(E-Mail Removed)...
> That is the correct method. Can you post some sample code?
>
> --
> Bryan Phillips
> MCSD, MCDBA, MCSE
> Blog: http://bphillips76.spaces.live.com
>
>
>
> "Seth" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed):
>
>> 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?

>



 
Reply With Quote
 
Bryan Phillips
Guest
Posts: n/a
 
      17th Jan 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed):

> 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" <(E-Mail Removed)> wrote in message
> news:ezRl$(E-Mail Removed)...
> > That is the correct method. Can you post some sample code?
> >
> > --
> > Bryan Phillips
> > MCSD, MCDBA, MCSE
> > Blog: http://bphillips76.spaces.live.com
> >
> >
> >
> > "Seth" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed):
> >
> >> 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?

> >


 
Reply With Quote
 
Jeff Johnson
Guest
Posts: n/a
 
      10th Dec 2009
"Serge Wautier" <(E-Mail Removed)> wrote in message
news:d7808469-8ffb-4a11-b45a-(E-Mail Removed)...

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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET ControlDesigner & smart tags cruster Microsoft ASP .NET 0 29th Apr 2007 01:00 AM
ControlDesigner for custom control mohit Microsoft C# .NET 2 16th Oct 2006 02:42 PM
ControlDesigner for custom win control mohit Microsoft Dot NET Framework Forms 0 14th Oct 2006 11:27 AM
ControlDesigner for TabControl Rachel Suddeth Microsoft C# .NET 5 10th May 2005 10:40 AM
ControlDesigner question =?Utf-8?B?bWFyaw==?= Microsoft Dot NET Framework Forms 0 5th Apr 2004 02:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:56 AM.