Product: PowerShell Studio 2022 (64 Bit)
Build: v5.8.206
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.19044.0
Within my OnLoadFormEvent for my mainform I performed a test-path for a file and if not present threw a popup (Show-popup) and followed this by $Mainform.close().
I expected this to terminate the UI immediately but, it continued, evident by another progress form being displayed and then after progress form close, it terminated.
The behaviour was corrected by adding a 'return' following the $mainform.close()
NOTE: This was done via the PSS Editor, not from a packaged EXE
$Mainform.Close() did not execute immediately
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: $Mainform.Close() did not execute immediately
[Topic moved to PowerShell GUIs forum by moderator]
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: $Mainform.Close() did not execute immediately
Interesting, after I posted this issue I noticed there was a new v5.8.207 build, so installed it.
Guess what?
Problem fixed!
Lightening fast resolution
Cheers
Guess what?
Problem fixed!
Lightening fast resolution
Cheers