Product: PowerShell Studio 2023 (64 Bit)
Build: v5.8.217
OS: Windows 10 Pro (64 Bit)
Build: v10.0.22621.0
Hello, I have a brand new form called $formCommands
I added 1 button called Close. For the code behind this button I have this:
$Close_Click = {$formCommands.Close()}
I compile and run my form. I press the close button and nothing happens. Is my close_click command inaccurate?
Thanks.
click close command not working
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: click close command not working
[Topic moved by moderator to PowerShell GUIs forum]
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: click close command not working
Normally that would close the form although the form may be blocked in another event. There is not enough information in your post to say why it won't close.
What do you mean by "compile" scripts are not compileable. Are you using PowerShell Studio or some other utility.
What do you mean by "compile" scripts are not compileable. Are you using PowerShell Studio or some other utility.
Re: click close command not working
Hello. Yes I am using PowerShell Studio.
Product: PowerShell Studio 2023 (64 Bit)
Build: v5.8.217
OS: Windows 10 Pro (64 Bit)
Build: v10.0.22621.0
Create new form.
Name form.
add 1 button to form called Cancel.
Choose the following settings. SAPIEN PowerShell V5 Host (Windows Forms)
compile form into an .EXE
run .EXE
press the close button. Nothing happens. The form will not close.
Thank you.
Product: PowerShell Studio 2023 (64 Bit)
Build: v5.8.217
OS: Windows 10 Pro (64 Bit)
Build: v10.0.22621.0
Create new form.
Name form.
add 1 button to form called Cancel.
Choose the following settings. SAPIEN PowerShell V5 Host (Windows Forms)
compile form into an .EXE
run .EXE
press the close button. Nothing happens. The form will not close.
Thank you.
Re: click close command not working
this is the exact code I have
$buttonClose_Click={
$Close_Click = {$formCommands.Close()}
}
is this incorrect?
$buttonClose_Click={
$Close_Click = {$formCommands.Close()}
}
is this incorrect?