PDA

Click to See Complete Forum and Search --> : Manipulating GDI+ Drawings


jmcilhinney
Oct 17th, 2009, 11:40 PM
VB version here (http://www.vbforums.com/showthread.php?t=588199).

The attached project demonstrates how the user can manipulate GDI+ drawings as though they were actual objects. It was created in VS 2008 but all the code should be compatible with VS 2005.

The application is supposed to behave, in a very rudimentary way, like the VS WinForms designer. You can click and drag to draw boxes on the form. The boxes will be drawn with an apparent z-order, where newer boxes appear to be in front of older ones. You can right-click on a box and select "Bring to Front" or "Send to Back" to change that z-order. You can also click the button on the tool bar to put the application into drag mode, which allows you to click and drag a box to move it around the form.

For an explanation of the genesis of this code, visit my blog (http://jmcilhinney.blogspot.com/2009/10/manipulating-gdi-drawings.html).

NickThissen
Jun 10th, 2010, 04:24 PM
As also posted in the VB.NET section of this codebank submission, I have made a very much extended version of this sample. It features multiple shapes (easily extensible with your own shapes), drag handles, resizing, and much more

http://i45.tinypic.com/5cj240.png

Check it out here (http://www.vbforums.com/showthread.php?p=3820428)!