How do you close a form in code?
I want a process to run when the form opens and when it is finished have it close and I just can't figure out how to do it.
Closing a form in code
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.
- chris.hartmann@braunability.com
- Posts: 4
- Last visit: Mon Dec 04, 2023 8:18 am
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: Closing a form in code
Use $MainForm.Close() or name of the form with *.close().
$NameOfTheForm.Close()
$NameOfTheForm.Close()
Code: Select all
$buttonCallChildForm_Click={
#TODO: Place custom script here
if((Show-ChildForm_psf) -eq 'OK')
{
}
## - sample of closing main form after working with the Childform:
$MainForm.Close()
}