Moving controls at runtime doesn't require IDesignerHost and all that jazz.
You can just move them around.
There isn't a method to do it directly in ControlPaint but you can use the
DrawReversible<xxx> routines to draw around where the control is on screen
to create the effect. You'll have to handle the mouse moves and such
yourself.

Signature
Bob Powell [MVP]
Visual C#, System.Drawing
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.
> Hi Bob,
>
[quoted text clipped - 19 lines]
> > > Thanks in advance and best regards
> > > Patrick
Patrick - 25 Nov 2004 13:01 GMT
Hi,
ok, I'm using the mouse move etc, I can move my controls, everything works
fine. I only have two more problems:
1) how can I select a control and visualize this with this surrounding frame?
2) how can I resize my control with this surrounding frame?
it would be very nice if you have further tips. which methods of the
ControlPaint class (or another one) do I have to use for this purpose and
where do I call them.
Do you also know how to use the property grid? I've seen sth on your website.
Thank you very much in advance.
Best regards,
Patrick
"Bob Powell [MVP]" schrieb:
> Moving controls at runtime doesn't require IDesignerHost and all that jazz.
> You can just move them around.
[quoted text clipped - 31 lines]
> > > > Thanks in advance and best regards
> > > > Patrick
Bob Powell [MVP] - 25 Nov 2004 13:46 GMT
Moving and sizing is pretty laborious. You need to create grab-handles that
represent the corners and the sides, track the mouse moves and button clicks
in them, redraw the rectangle and resize the control. All pretty standard
stuff but a pain to do.
Yes, I know about PropertyGrid...

Signature
Bob Powell [MVP]
Visual C#, System.Drawing
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.
> Hi,
>
[quoted text clipped - 52 lines]
> > > > > Thanks in advance and best regards
> > > > > Patrick
Bob Powell [MVP] - 25 Nov 2004 13:47 GMT
Contact me by private mail. I may be able to help you.

Signature
Bob Powell [MVP]
Visual C#, System.Drawing
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.
> Moving controls at runtime doesn't require IDesignerHost and all that jazz.
> You can just move them around.
[quoted text clipped - 31 lines]
> > > > Thanks in advance and best regards
> > > > Patrick