Posts Tagged ‘Winforms’


PowerShellGet-GUI Part 2

Thursday, November 12th, 2015 by Ferdinand Rios
Continuing on from where we left off in our last blog post entitled "PowerShellGet-GUI part 1", let us examine some of the other features of the PowerShell Get GUI application. With our list successfully loaded with PowerShell Gallery modules, the user can take several actions: Select a module to inspect it's properties Select a non-installed module to install it Select an installed module to uninstall it Case 1 [caption id="attachment_10223" align="aligncenter" width="1273"] Figure 1[/caption] When the user clicks on an item in the list, the listview_ItemSelectionChanged event fires and is handled by our $lvModules_ItemSelectionChanged event handler seen in Figure 1…   More »

PowerShellGet-GUI Part 1

Tuesday, November 10th, 2015 by Ferdinand Rios
Back in mid-September, I presented a talk on "Building PowerShell GUI Tool Solutions" at the PowerShell Conference Asia in Singapore. The talk centered around GUI application design and development using PowerShell as the core language. During that talk , I developed an application that used PowerShell's PSGet module to communicate with the PowerShell Gallery. Finishing work was done by Devin Leaman of SAPIEN Technologies. The recorded talk should be available at some point on the PowerShell Conference Asia Website. The application creates an interface that displays gallery module information and allows the user to easily add and remove modules from their…   More »

Why does this button close my form?

Monday, June 29th, 2015 by David Corrales
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 form to close after the user has clicked the button without you having to explicitly close the form in the button’s click event script block. So next time you copy an OK or Cancel button, be sure to set the button’s DialogResult to None. For…   More »

PowerShell Studio: Initializing my GUI controls

Tuesday, August 5th, 2014 by David Corrales
If you are working with a GUI script within PowerShell Studio and find that you need to edit the exported script to modify the control’s initialization, then you are doing something wrong. Don’t get me wrong, modifying and initialization of control properties is not the issue; in fact that it part of writing a GUI. What I’m referring to is the part where you are editing the exported scripts. If you are editing the exported script: 1. You are creating an extra step which means you need to export and modify the script anytime you make a change to the…   More »

Building PowerShell GUI Solutions

Thursday, March 27th, 2014 by Ferdinand Rios
The second leg of SAPIEN's Building PowerShell GUI Solutions world tour is complete. This trip took us to Dallas, Raleigh and to New York City for the NY Techstavaganza. We had a great time showing PowerShell users how to create great GUI interfaces for their PowerShell scripts, and how to use PowerShell Studio 2014 to create a complete cradle to grave development workflow. [caption id="attachment_7094" align="alignnone" width="300"] Raleigh, NC[/caption]   [caption id="attachment_7095" align="alignnone" width="300"] NY Techstravaganza[/caption]   We continue to add cities to our tour and are looking for more user groups to speak at. In April, we will be presenting…   More »

Spotlight on the ToolTip Control

Thursday, January 30th, 2014 by David Corrales
The Spotlight on Controls series describes the controls, that is, the objects in the System.Windows.Forms namespace, so you can use them effectively when building GUI apps in PowerShell Studio and PrimalScript. Each post focuses on one control and lists its most important properties, methods, and events, including the default event that PowerShell Studio adds to your script when you double-click the control. The posts include many examples written in Windows PowerShell, so you can use them right away. Read more: Spotlight on Controls: Common properties and methods This post describes the ToolTip control. ToolTip [System.Windows.Forms.ToolTip] Represents a small rectangular pop-up…   More »

PowerShell Studio: Ambient properties

Tuesday, January 7th, 2014 by David Corrales
In the PowerShell Studio: Enable and Disable Groups of Controls article we discussed how you can enable or disable group of controls by setting the parent control’s Enable property. Now we will look at other properties that have a similar trickle down effect, but work fundamentally in a different fashion. For example, if you change the font of the Form control, you may notice that all the controls within the form change their fonts accordingly. These trickle down properties are known as ambient properties. Ambient properties are properties that if not individually set, take their value from the parent control.…   More »

PowerShell Studio: GUI Tutorials

Tuesday, December 24th, 2013 by David Corrales
The guys over at PowerShell Task Force have been posting a series of GUI Tutorials using PowerShell Studio 2012, including a festive Christmas GUI: Create AD users the GUI way: Merry Christmas – How To:   I would like to thank PowerShell Task Force for the tutorials! Happy Holidays!…   More »

PowerShell Studio 2012 – WinForms – GUI ToolMaking

Wednesday, October 16th, 2013 by David Corrales
Francois-Xavier Cat over at the LazyWinAdmin blog, wrote a follow up article to Creating a GUI with PowerShell Studio. Like the previous article, a video is included:   “Today I will go a bit further and show you how to create a tool to query some information from a remote computer. I will first send the Output to Out-GridView cmdlet and then show you how to send it to a DataGridView control inside the GUI.”     Read the full article here:   Thank you once again Francois-Xavier!…   More »

Creating a GUI with PowerShell Studio

Tuesday, October 8th, 2013 by David Corrales
Francois-Xavier Cat over at the LazyWinAdmin blog, wrote a great article on how to create a basic GUI using PowerShell Studio 2012. In addition, the article includes a video of the process:   “The following post will demo how to create a basic Graphical User Interface with SAPIEN PowerShell Studio 2012. Last year I released a PowerShell script called LazyWinAdmin 0.4 which is a script that generate a Graphical User Interface. I used SAPIEN PowerShell Studio 2012 to create this Interface and write my PowerShell code.” Read the full article here:   Thank you for the article Francois-Xavier!…   More »