Bob
Thu Jul 14 11:43:48 CDT 2005
In the designer we keep the previous positions of the bits we're interested
in in screen coordinates and do a comparison. This enables us to resize some
control points other than those on the grab-handles.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"dei" <dei1@eieioh.net> wrote in message
news:1121346750.225066.47240@o13g2000cwo.googlegroups.com...
> How do you deduce which corner or edge of the control was dragged from
> the control's OnSizeChanged event? We were trying to hook the
> mouse-down event to deduce the edge being dragged.
>
> When you drag the left edge of a control, you get a LocationChanged
> event that moves the left edge of the control to your "drop location"
> while keeping the size of the control the same. This is followed by a
> SizeChanged event that adjusts the width of the control to give it your
> new size. How do you differentiate this sequence form a user generated
> move of the control followed by a right edge drag of the control?
>