GUI how to create multiple forms

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 10 years and 2 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
mattalter
Posts: 23
Last visit: Thu Apr 03, 2014 8:56 am

GUI how to create multiple forms

Post by mattalter »

How would I go about creating a form based project with multiple forms that open inside the main form. Not open on top of it.

Think like an explorer view.

Thanks
Matt
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: GUI how to create multiple forms

Post by jvierra »

Are you asking if you can build an MDI Window?

What does "open inside of" mean. FoxPro has MDI as do other compiled programs. Is that what you are asking about?
User avatar
mattalter
Posts: 23
Last visit: Thu Apr 03, 2014 8:56 am

Re: GUI how to create multiple forms

Post by mattalter »

Not really. Like a web page that has links on the left side and clicking that link open that section to right of it. All in the same window, or my explorer reference.
User avatar
mattalter
Posts: 23
Last visit: Thu Apr 03, 2014 8:56 am

Re: GUI how to create multiple forms

Post by mattalter »

Could I use the panel object to open a form. I would something lime vertical tabs on the left that would open to the right.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: GUI how to create multiple forms

Post by jvierra »

No -- but you can create multiple panels and hide and unhide them based on a button, link or menu item.

What we generally would do is use a tab strip and just let the tabs be the menu. After that changing the visible form is automatic.
User avatar
mattalter
Posts: 23
Last visit: Thu Apr 03, 2014 8:56 am

Re: GUI how to create multiple forms

Post by mattalter »

How to call the panels. There does not seem to be a load function?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: GUI how to create multiple forms

Post by jvierra »

There is no "load" function for a control. Load is an event on a Windows Form which is fired after the form and all controls are created.

I would start here: http://www.sapien.com/blog/topics/user- ... istrators/

Do all of the examples and read the explanation. You will begin to understand how Windows Forms work.
User avatar
mattalter
Posts: 23
Last visit: Thu Apr 03, 2014 8:56 am

Re: GUI how to create multiple forms

Post by mattalter »

Using

$panel3.Visible = $true

$panel4.Visible = $false

Did the trick.
This topic is 10 years and 2 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked