My VB6 Picturebox is now a Panel in Net ??

zekeman

Well-known member
Joined
May 23, 2006
Messages
224
Programming Experience
10+
-----In VB6 my program printed text on a picturebox. ------

Now after converting with the wizard, the picturebox is now a panel. Can I use the GDI+ to print text on a 'panel'?

It seems like the GDI+ only allows printing of the text/graphics on the form itself.


I need to group the text so that it can be highlighted when the mouse rolls over and also sense a double click in that text area.

My question is: How can I do this now?
 
Better remove the Panel control and add a new Picturebox control, both can be drawn to but it is more the intent of the Picturebox optimized for displaying graphics, Panel is a container optimized to contain other controls.. You can use the controls Paint event and the e.Graphics provided there to draw.
 
There's no point using a PictureBox unless you intend to use its Image property. If you want to save whatever is drawn on the form then the PictureBox is a good option because it's easy to transfer what's drawn on the PictureBox to the Image below and then save it. If you don't need to do that then the Panel is just as good a choice.
 
Back
Top