Showing multiple child 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.
Locked
User avatar
Lembasts
Posts: 293
Joined: Thu Mar 15, 2012 9:47 am

Showing multiple child forms

Post by Lembasts »

Greetings,

I have a mainform with several buttons. Each button launches another form using Show-<form>_psf.
When I launch a child form I cannot go back to the main form to launch another form.
Is it possible to launch multiple child forms?
Thanks
David

jvierra
Posts: 14452
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Showing multiple child forms

Post by jvierra »

Not by any normal means. PowerShell only supports modal dialogs and not main forms. You can launch a separate, independent form By using a runspace.

jvierra
Posts: 14452
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Showing multiple child forms

Post by jvierra »

I dug out an old demo project and tested it. It shows how to make a child form run as an independent form that does not block the main form.
Attachments
Demo-MultFormClient.zip
(133.1 KiB) Downloaded 65 times

Locked