Open more than one subform from main window ?

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 12 years and 1 day 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
Kenneth
Posts: 19
Last visit: Sun Jan 24, 2021 11:10 pm

Open more than one subform from main window ?

Post by Kenneth »

Hi, I am currently making a 'Toolbox' which will contain several seperate tools that our sales organisation uses. This works fine - I simply open a subform when a button in the main window is clicked (using the 'call' command), but how do I make it possible to open more than one tool from the main window ? When a subform(a tool) is open, the main form is not usable(meaning that nothing happens when I click the buttons on the mian form). Best regardsKenneth
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Open more than one subform from main window ?

Post by davidc »

Do to limitations in PowerShell, it only supports "Modal" Windows. Meaning the parent form is frozen until the other window closes. If you do not have any interactions between the forms, you could consider calling the form in a different runspace or try packaging each individual form and call the executable from the main script. David
davidc2012-03-26 10:09:55
David
SAPIEN Technologies, Inc.
User avatar
Kenneth
Posts: 19
Last visit: Sun Jan 24, 2021 11:10 pm

Open more than one subform from main window ?

Post by Kenneth »

Thanks David. I understand what you say about packaging each exe individually, but maybe a new runspace is the best for me.. I tried googling it - looks like 'start-job' is what I should use, but can that be used to call a form ?Kenneth2012-03-27 01:32:39
User avatar
Kenneth
Posts: 19
Last visit: Sun Jan 24, 2021 11:10 pm

Open more than one subform from main window ?

Post by Kenneth »

Ok, I think I found a way. It doean't look as if I can call a form with start job, but if I export the form to PS1, and use the start job(after adding the PS1 file to the project), it seems to work. /Kenneth
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Open more than one subform from main window ?

Post by davidc »

In Options->Designer check the "Export Form Script in a New Runspace" check box and export each individual form. Make sure you uncheck this option once you are done. But if Start-Job works, then you needn't bother with this setting. David
David
SAPIEN Technologies, Inc.
User avatar
Kenneth
Posts: 19
Last visit: Sun Jan 24, 2021 11:10 pm

Open more than one subform from main window ?

Post by Kenneth »

Thanks again David.Start-job seemed to work, but if I closed the main form before the subform, the program crashed. Best regardsKenneth
This topic is 12 years and 1 day 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.