open MDIchild in parent form

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 6 years and 3 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
Kishmish
Posts: 1
Last visit: Fri Apr 28, 2023 6:11 pm

open MDIchild in parent form

Post by Kishmish »

I would like to create a multiform project where all child forms are contained inside the main form which is set to IsMDIContainer=true. I currently have the childform to open in the mainform, however it immediately disappears.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: open MDIchild in parent form

Post by jvierra »

PSS has no support for using forms in an MDI. YOU can manually build a form and use it or you can hand edit a PSF file to make it work. Full Support for an MDI requires many steps and it requires that you understand that many events in an MDI child are handled by the MDI Parent form.

Attached is a simple working example as a PS1 file:
Attachments
Demo-MDIForm.ps1
(6.71 KiB) Downloaded 121 times
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: open MDIchild in parent form

Post by jvierra »

Here is a project that shows some ways to dynamically alter a generated form to be MDI compatible.
Attachments
Demo-MdiFormProject.zip
(36.33 KiB) Downloaded 590 times
This topic is 6 years and 3 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