Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Wire Up PowerShell GUI Buttons

$
0
0

Summary: Learn to use the OK and Cancel buttons in a Windows PowerShell GUI.

Hey, Scripting Guy! Question How can I use Windows PowerShell to get my GUI’s OK and Cancel buttons to trigger when
           the user presses ENTER or Escape?

Hey, Scripting Guy! Answer Assign the OK and Cancel button objects to your form’s AcceptButton and CancelButton properties:

$form.AcceptButton = $OKButton
$form.CancelButton = $CancelButton


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>