Open more than one subform from main window ?

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
User avatar
Kenneth
Posts: 19
Joined: Sun Feb 26, 2012 9:30 pm

Open more than one subform from main window ?

Post by Kenneth » Sun Mar 25, 2012 7:01 pm

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
Joined: Thu Aug 18, 2011 4:56 am

Open more than one subform from main window ?

Post by davidc » Mon Mar 26, 2012 2:57 am

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
Joined: Sun Feb 26, 2012 9:30 pm

Open more than one subform from main window ?

Post by Kenneth » Mon Mar 26, 2012 6:16 pm

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
Joined: Sun Feb 26, 2012 9:30 pm

Open more than one subform from main window ?

Post by Kenneth » Mon Mar 26, 2012 7:26 pm

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
Joined: Thu Aug 18, 2011 4:56 am

Open more than one subform from main window ?

Post by davidc » Tue Mar 27, 2012 3:08 am

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
Joined: Sun Feb 26, 2012 9:30 pm

Open more than one subform from main window ?

Post by Kenneth » Tue Mar 27, 2012 6:29 pm

Thanks again David.Start-job seemed to work, but if I closed the main form before the subform, the program crashed. Best regardsKenneth