

Instead, it's the conveniences that PowerShell studio adds, including wrapping forms in functions and making critical property values of the controls on each form easily accessible to the other form. The cool part of this exercise is not the functionality of the UI, which is quite limited. When you type a message in the text box on the child form, and then click OK, the child form closes and the message that you typed appears in the text box on the main form.

When you click the Open Child Form button on the main form, the child form opens. This little app starts with a main or parent form. But, to show you how to work with multiple forms, I want to start with a really simple example. It can be as simple as an app that launches a message box or as complex as a dozen-page wizard that collects a significant amount of data. So, here's one for my friends in Austin! What's a Multi-Form App?Ī multi-form or multi-page app is a GUI application with more than one window. A few of the questions were focused on the DialogResult property of forms and I realized that I didn't have a simple example of a multi-part form. The attendees asked terrific questions - really insightful - and we had a great time. (Learning to write GUI apps? PowerShell GUIs: Where do I start?) This is a weird exercise for PowerShell folks who are used to linear programming of scripts that run in a console. This month, we were enjoying my Thinking in Events hands-on lab, where we build a PowerShell GUI and wrap it in an exe. And, Austin is home to whole slew of computing powers, including Facebook, Dell, IBM, AMD, 3M, and the famous University of Texas at Austin. I had a great time in Austin, Texas (yes, Austin is still in Texas) last week with the Austin PowerShell User Group ( Founded by Thom Schumacher and now admirably led by Aditi Satam, this awesome group serves PowerShell folks in the whole Austin metro area. Otherwise, start with the My First Form videos ( Part 1: Build a Simple PowerShell GUI App and Part 2: Controls and Properties) and read the beginner blogs in PowerShell GUIs: Where do I start?


In this blog, we assume that you know how to create a single-form PowerShell GUI app or that you've participated in a Thinking in Events hands-on lab. If you prefer a video, see Create a Muiti-Form PowerShell GUI App (video). When you finish, you'll know how to use the basic multi-form features of PowerShell Studio.įor details about how these features work under the covers, see How Do Multi-Form Projects Work? If you get stuck, the code for this project is on GitHub. The app consists of a parent form that gets data from a child form and displays it. This step-by-step example shows you how to create a very simple multi-form PowerShell GUI app. The instructions in this article were updated in September 2022. This article was written in 2016 (PowerShell 2016, PowerShell 2.0+).
