Have you ever copied a button and found that when a user presses it, the form closes immediately afterwards? We are here to answer: Why does this button close my form? The reason the form closes is that the Button control’s DialogResult property is set to a value other than None. This property tells the […]
Tag: Form
PowerShell Studio: Knowing when to use STA mode
Follow @SAPIENDavid Recently, on our forums, a user asked why certain controls didn’t function correctly or threw an error when he unchecked the STA option in PowerShell Studio. STA (Single Threaded Apartment) and MTA (Multi-Threaded Apartment) determine how a process manages legacy COM objects and their communication with multiple threads. I will not go into […]
PowerShell Studio: Form and Script Recovery
Once in a while our support team gets a request to recover a script from a packaged executable because the original was lost. In fact this just happened recently when a user contacted us to recover his lost form project from his packaged script. We were able to recover the script, but unfortunately the user […]
PowerShell Studio: New Form Template
In the (v3.1.9) service release we introduced a new form template called: Wizard Template. This template simulates an application wizard by utilizing a TabControl to represent the various pages of the wizard. The template also includes navigation buttons that enable and disable depending on the current position and if the controls validate. Each tab […]
PowerShell Studio: Creating Responsive Forms
When working with GUIs you may have noticed that the Form can freeze when running long scripts. Previously I discussed how to make your loops more responsive in this article, but not every long script comes in the form of a loop. If you truly want to make your forms responsive, you will need to […]
South Florida IT Camp 2011
I had a fun time at last Saturday’s South Florida IT Camp . The camp was a great opportunity to meet old and new friends. I would like to thank all the IT Camp organizers for allowing me to present a session on “How to create GUIs for PowerShell using PrimalForms 2011.” I would especially […]
PrimalForms 2011: Creating Responsive Loops
In the PrimalForms: Preventing Multiple Button Clicks blog article, we introduced the [System.Windows.Forms.Application]::DoEvents method, which allows the application to process form events. This method also becomes very useful when you have a script that runs through a long loop. Here is a sample loop with a progress bar you may encounter in your script: $buttonProcessLoop_Click={ […]