non-modal forms

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

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 5 years and 4 months 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.
User avatar
AndySunny
Posts: 4
Last visit: Sun Mar 24, 2024 12:14 am

non-modal forms

Post by AndySunny »

Hi, I am trying to open multiple forms from my main form in one go, like this:

Show-ChildForm1_pff
Show-ChildForm2_pff



Unfortunately, this doesn't work since the first form (ChildForm1) will be opened as a modal form and the call for ChildForm2 will be only called after ChildForm1 has been closed again.

Is this even possible?


The childforms should basically behave independently of the main form (there will be timers, grids etc that refresh the data in intervals)

PowerShell Studio 2017
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: non-modal forms

Post by davidc »

Due to the limitations of PowerShell, having a non-modal dialog is not supported by PowerShell Studio.
Showing a non-modal dialog is possible, but you have to heavily modify the generated script so that everything is in a global scope. All the local form variables will go out-of-scope after the show function is called because the non-modal form returns immediately after calling the Show method.
David
SAPIEN Technologies, Inc.
User avatar
AndySunny
Posts: 4
Last visit: Sun Mar 24, 2024 12:14 am

Re: non-modal forms

Post by AndySunny »

Thanks David, i think i'll go with a single form instead then
This topic is 5 years and 4 months 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.