Frame is the control used for splitting your form into groups and specially grouping your Option Buttons.
Suppose you have the form in which you need to have options for Selection of Gender ( Male or Female) and another option Marital Status (Married of Single), Another Option Educated or Uneducated so if you draw six option buttons like one for each Male, Female, Married, Single, Educated, Uneducated then you can only make one selection in all of these six options but we need to make one selection in Each group i.e One from Male/Female one from Married/Single and one from Educated/Uneducated so for this reason we can use Frame.
frame is just like the form i.e a container of objects.
Drag a frame. by default its name will be frame1. frame has many common properties with other objects which are used frequently i.e Caption, Border Style, Back Color, Enabled etc.
Enabled if true then you can click on the objects on that frame but if False then you can't click on that frame.
but keep in mind one thing that when you are placing the objects on the frame then you must drag directly onto that frame or if that object is already been placed on the form then cut it from form and paste it onto frame.
in case of grouping option buttons, all option buttons on a single frame will be considered as one separate group.
what if i want to have two or more sub-groups within one frame?
ReplyDeleteis there any such option available?
what are other usages of frame in vb??
ReplyDeleteframe can be used as a seperate container of objects.
ReplyDelete