Archive for the ‘GUIProgramming’ Category


 

New! “Check out this feature” Videos

Friday, November 20th, 2015 by June Blender
How many times have you found about a feature of a SAPIEN product, like PowerShell Studio, and realized that 1) you never knew it existed and 2) it would have saved you gobs of time had you only known about it. We're introducing a new series of videos on our SAPIEN Technologies YouTube channel to help you keep up with all of the features in SAPIEN programs, like PowerShell Studio, PrimalScript, VersionRecall, and PowerShell HelpWriter. Even when you know these programs well, there are so many features that you might have missed a new one, or even an old one,…   More »

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 »

Hidden Charms of PowerShell Studio

Monday, September 28th, 2015 by June Blender
I'm coming up on my one-year anniversary at SAPIEN Technologies, Inc. and my one-year anniversary of using PowerShell Studio as my primary IDE. When I speak at conferences and user groups, I don't typically talk about products, because people don't want to hear "vendor talks." But, in private, I've become a total PowerShell Studio fan-girl. It's a bit embarrassing, honestly. I love the big powerhouse features, like PowerShell GUI automation, .EXE and .MSI creation, the Function Builder and Parameter Builder, and New Module from Functions. But, it's the smaller, quieter features that have me hooked. Here's my list of can't-live-without-'em…   More »

PowerShell Conference Asia 2015

Friday, September 25th, 2015 by Ferdinand Rios
PowerShell Conference Asia (#PSConfAsia) held its inaugural sessions on September 18th and 19th, 2015 at Microsoft headquarters in Singapore. SAPIEN was the platinum sponsor of this event. A great set of sessions was kicked off with a State of the Union talk by Jefferey Snover (Technical Fellow at Microsoft and creator of PowerShell). Ferdinand Rios (CEO of SAPIEN) followed up with a talk on Building PowerShell GUI Solutions, where he demonstrated how to build a GUI PowerShellGet application using PowerShell Studio. The rest of the sessions had a concentration on DSC, Sharepoint and DevOps. In particular, there was a lot of…   More »

Scope in a PowerShell GUI App

Wednesday, September 9th, 2015 by June Blender
If you search the SAPIEN blog, you'll realize that this is the not our first blog about scope in PowerShell GUIs. In March 2013, SAPIEN CTO Alex Riedel wrote First Rule of PowerShell Scoping Rules, a title that implies the final word in a discussion that wasn't easy to end. Alex's blog explained the differences between scoping rules in PowerShell and other languages, like VB Script. Then, just a month later, SAPIEN Senior Developer David Corrales wrote PowerShell Scoping Revisited, another great post about function scope in PowerShell. A quick search reveals even older posts by Don Jones and Jeffery…   More »

PowerShell GUI Debugging Tip: Duplicate Event Handlers

Tuesday, September 8th, 2015 by June Blender
I'm not a professional tester, but I am an expert at making mistakes. I take risks. I try everything. I gravitate to "corner cases" and odd circumstances. That makes me a great amateur tester and, due to a lifetime of experience with breaking things, a pretty good debugger. But, at the Omaha PowerShell User Group meeting in August 2015, I was stumped. What caused this bug? David Jones, an Omaha PSUG member and talented PowerSheller, showed me the following code. $FormGetService_Load = { $textboxComputerName.Text = $env:ComputerName } Looks perfect. But when he ran his script, on load, the $TextboxComputerName textbox was empty.  …   More »

The Methods that Register Events

Monday, August 31st, 2015 by June Blender
If you create PowerShell GUI apps in PowerShell Studio, you become very familiar with the events of the Windows Forms types, like the Load event of forms, the Click event of buttons, and the TextChanged event of textboxes. PowerShell Studio handles most of the background details of event management for you, but it's useful and interesting to understand how events work in the Microsoft .NET Framework. This knowledge comes in especially handy when something doesn't work and you need to understand enough to fix it. One of the little mysteries that I couldn't understand were the methods the .NET uses…   More »

Typing Enter Pushes a Button

Monday, August 17th, 2015 by June Blender
As a beginner developer of PowerShell GUIs, I'm always looking for easy ways to make my simple applications more sophisticated and usable. One of the basic usability features in most applications is typing <Enter> in a textbox to invoke a function instead of clicking a Start, Go, or OK button. In this post, I'll show you two ways to do it. One technique is significantly simpler than the other, but works only when there is exactly one "Go" button. The more complex technique works for multiple buttons and keys other than <Enter>. Registering a KeyDown Event Handler Let's start with…   More »

PowerShell GUIs: Where do I start?

Thursday, July 16th, 2015 by June Blender
Follow @juneb_get_help I've been using Windows PowerShell since the very first version of Monad in 2005, but PowerShell-based applications with a graphic user interface (GUI) are a whole new world. Instead of thinking of cmdlets and parameters or properties and methods, you need to think in object events. And because there's no console with .ps1xml-directed views, you need manage all output streams, including standard output and errors. Most importantly, because you're dealing with real users, you need to assume that people will type and click whatever they please in whatever order you let them. It reminds me of turning the…   More »