Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BringToFront equivalent when using DrawPath 1

Status
Not open for further replies.

waytech2003

Programmer
Jul 14, 2003
316
US
Just learning VB2010 after many years in VB6. I was wondering if there is a way to move a System.Drawing.Graphic on top of another after they have been drawn. All I can conclude at this time is that they stay in the order that they are created.

I have an array of graphics. My drawing is done in a Panel control, and I have them drawn in that panel's paint event. I test to see if the user has clicked on a shape, then I work with that shape. How would I bring it to the front? My thought at this moment is to reorder the array, and have the Panel repaint itself.

Any ideas other than that would be appreciated.
 

Use an array of PictureBoxes. Draw your images to the PictureBoxes - 1 per box - then add the PictureBoxes to the panel, using the z-order property to put them in the order you want.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
jebenson

Your idea seems to do what I need at this time.

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top