By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,988 Members | 1,493 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,988 IT Pros & Developers. It's quick & easy.

Can I load a frame with its compenents together?

P: 3
Hi every one.

I want to load a frame with all off its compenents. for example I have a frame named FRM(0) , and in it option box OPT(0) and a commanad bottum CMD(0), they are all arranged in a certain way, I want to load a new frame with all the compenent so that it's a copy of the original one , is there a way to do that?

Thanks in advance.
Nov 6 '06 #1
Share this Question
Share on Google+
7 Replies


100+
P: 267
hi

if all controls are within the frame, you only need to copy and paste the frame, the controls will follow.
or hold Ctrl or Shft button while selecting your controls (left mousebutton).
when all are seleced, copy and paste elsewhere.
note that VB will ask if you want arrays if you paste to the same form.
Nov 6 '06 #2

Expert 5K+
P: 8,434
hi

if all controls are within the frame, you only need to copy and paste the frame, the controls will follow.
or hold Ctrl or Shft button while selecting your controls (left mousebutton).
when all are seleced, copy and paste elsewhere.
note that VB will ask if you want arrays if you paste to the same form.
Not if they are already arrays, as indicated in the original post.
Nov 6 '06 #3

P: 3
Dears,
I want to load the frame via code, since I want the number of frames to be variable.
Nov 7 '06 #4

100+
P: 267
Dears,
I want to load the frame via code, since I want the number of frames to be variable.
hi
nasty matter
haven't done this before.
mostly i try to get out of the way for such problems, so i create same frame(s) and components and set visible=false
by the tim i need them i have the code change it to visible=true
may even use move ... to reposition.
Nov 8 '06 #5

Expert 5K+
P: 8,434
hi
nasty matter
haven't done this before.
mostly i try to get out of the way for such problems, so i create same frame(s) and components and set visible=false
by the tim i need them i have the code change it to visible=true
may even use move ... to reposition.
If anyone does know how to load a frame and its contents at runtime, I'd be very curious to know the answer too. I have spent a few minutes fiddling with it, and couldn't get it to work. Sure, you can load new occurrences of the frame, and of the contents, but the loaded contents are still in the original frame.

In the meantime, if the maximum number is known at design time, or you can choose some arbitrary maximum, it's probably going to be much simpler to use albertw's suggestion - create them at design time and hide them until needed.
Nov 9 '06 #6

P: 3
Thanks for your attention.

I was thinking of a code that does the function of copying and pasting. any way I think the only solution is to make the maximum number of frames fixed and do as you said about hiding unnecessary ones.

by the way I want this code since I want to make a program that contains a variable number of frames, in each frame I have an array of check boxes, the user will check some of them. then I will use the data which was created by this array in another application. so I thought about using a data gride instead of check boxes and let the user to enter 1's and 0's in it, it will be easier for me but less professional. but the problem was I didn't know how to deal with the data gride, or which one to use as I found many tools in VB6!!!! any help please!!!
Nov 9 '06 #7

Expert 5K+
P: 8,434
Yes, there are rather a lot of them. If you just want to play with it on the form, nothing to do with attaching it to a database table or anything, then you can probably skip the "data..." and "databound..." ones. Flexgrid might do what you're after.

Also, though I'm a bit rusty on the grids, I think if you get it right you can have checkboxes in the cells.
Nov 9 '06 #8

Post your reply

Sign in to post your reply or Sign up for a free account.