|
-
Apr 13th, 2004, 04:16 AM
#1
Thread Starter
Frenzied Member
How to open a new form inside an existing?
This is probably very simple, but Im originally an asp.net programmer, and now I need to make a small windows app.
I have 4 winforms in a project.
On the fifth winform I have a menu where it is possible to select which window I want to show... I have have all four windows open at the same time... but how do I contain them within the "main" form? And how is the best way to write when to show-hide them?
Kind regards
henrik
-
Apr 13th, 2004, 04:25 AM
#2
Junior Member
I think you can set your main form as a parent form and your others as a child... I haven't tried this myself, but that's what I reckon. Otherwise you can play around with the Location method.
I hope it helps...
-
Apr 13th, 2004, 07:55 AM
#3
Thread Starter
Frenzied Member
I have looked everywhere but haven't found a way to se this... but that is exactly what I want to do... specify the other windows as childs...
I have another question though.
Is there a way in the setup&deployment project to check if the .net framework is installed? I know about the "search target machine" feature, but what should I look for to be sure?
And which is the best way to then install the framwork? I don't want to distribute it with the application pack. Can I add a link to a download site? Or just a simple message saying.. please install the .net framwork from download.microsoft.com, click here to end the instalation
Kind regards
henrik
-
Apr 13th, 2004, 09:19 AM
#4
PowerPoster
Hi,
You can set the main form IsMdiContainer property to true at any time. You can then set the MdiParent property of the form you wish to display to True and set it to False when you are finished with it.
e.g.
VB Code:
Me.IsMdiContainer = True
frmCurrent.MdiParent = Me"
You can, of course, set the MdiParent property of several forms(Unless their IsMdiParent property is set to True) but all child forms will automatically appear unless you set it's Visible property to False. By doing this, of course, you do discolour the original main form.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|