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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frame vs. PictureBox for Option Button Container 1

Status
Not open for further replies.

jv6886

Programmer
Dec 31, 2002
46
US
In one of my apps, I'm creating an array of "Yes/No" option buttons. Normally I use Frames to group my option buttons, but in this case a PictureBox is easier to line up graphically the way I need it.

Does anyone know if I'm taking any kind of significant performance hit by using PictureBoxes vs. using frames?
 
I would suggest you to stick to frames as they have less overhead and they perform better than picture boxes.

But I don't think that there would be a "significant" performance hit if you use picture boxes instead of frames.

>in this case a PictureBox is easier to line up graphically the way I need it.

I don't understand this. Can you explain it how?
 
Thank you for your answer!

The Frame control has a small amount of space above the useable container area to accommodate the Frame's label. The PictureBox's useable container area goes right up to the top of the control.
 
If you set the BorderStyle of a frame control to 0 (None), it looks like a picture box with no border.
You can then place controls in it right up to the top left corner like in a picture box.
 
I didn't know that. . . Thanks for the info!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top