Discussion Locked

VB & Frame

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have some fields in my form & now I would like to put them in the Frame, so that when the Frame is moved all the fields also are moved with it.

Do I have re-create the all fields on the frame or is there a simpler way by which I can add the existing field on the newly create frame.

Thanks

7 replies

by dushy_ant

Press controls key and select the fields.

Just Cut these fields from the form by pressing (ctrl + X) and Paste (ctrl + V) them on the frame

by danprem

You will have set the container property for each field to point to the frame, perhaps at the form_load event of your from. Here is an example of how that is done

Private Sub Form_Load()
Set Label1.Container = Frame1
Set Text1.Container = Frame1
Set Command1.Container = Frame1
End Sub

You can also position the controls withing the frame using the top and left properties.

Hope this suffices.

by rrv

before putting the frame on the form, click on free area on the form and drag over rectangularly on all the controls. dotted lines appear to select all controls. once done press control+X. All the controls are in the clipboard now. now draw a frame as you wish on the free form. Now you select the frame by clicking it. now press Control+P. And you see all the selected controls in the frame with same formatting but the top left control in top as 0 and left as 0 with respect to the frame. now the container is frame not form for all the controls.

All the best
RV

This discussion is closed to new replies.