Hopefully this won't be confusing but I'm having a real hard time figuring this out...
I am trying to have a Frame from another Form show in a frame in a different form..
Example:
Form1 has Frame1 on it
Form2 has Frame2 on it
Form3 has Frame3 on it
I would like for Frame1 on Form1 to be able to show Frame2 from Form2 or Frame3 from form3..
Basically I have 2 radio buttons on the main form (form1) the user selects radbutton1 (=true) then Frame2.visible = true inside of Fram1 (which is just a blank frame that is a place holder for the other frames)
If a user select radbutton2 = true then I need Frame3 from Form3 to be visible in Frame1.
I realize I could put Frames over the top of each other and make them visible and invisible in that form, but that is a pain in the ***....
Just wondering if anyone has any ideas on how to do this in a more inelligent manner. THanks!
Think I get the jist of what your saying. Would a tabbed dialog do the job? If not, you could maybe post a screenshot of your forms.
Check this out though,
Hope it helps
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rich Cook
Unfortunetly by popular demand it has been requested to use radio buttons instead of the tabstrip. I think I figured out a different way to do this. I will simply create seperate user controls. Plop them on top of one another, and make them invisible/visible when the selects that radio button, and that will allow me work on the seperate controls away from the form. This way it's more organized, since I'll be working on the seperate controls all the time.....
One question: Why would you want to put the frames on different forms?
You can pull a control from one form onto another using the SetParent API, but positioning the control, and using the events and such would be a different matter, because vb still treats the control as being a child window of the orginal form. You can use the Container property to place controls into the frame, but it needs to already be on the form. At this point, it sounds to me that you may benefit from using a control array. Then you can use the same events for all the frames and/or controls. You can also use the ZOrder property to put a control on top of other controls which may overlap it.
As suggested by cjard, moving the controls out of view is another way to do it. You can still use an array, and a simple loop can go through all the frames, and set them out of the way, or in view, depending on the index of the selected OptionButton. Either moving them, setting them invisible, or setting the ZOrder can work. There may be other easy ways depending on the results you are trying to achive.
Last edited by WizBang; February 12th, 2005 at 04:15 PM.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.