Page 1 of 1

Messagebox after Close (x)

Posted: Tue Sep 25, 2018 11:35 pm
by PanklIT
Hi there,

quick question - i think its quick - but i was not able to find a proper answear.

I do have a form project and everytime when i close the form with the Close Icon (x) (not a close button, just the red windows x in the upper right corner :-) ) i get an messagebox with "Cancel" and an "OK" button:

Image

How can i suppress this message?

Thanks, Raphael

Re: Messagebox after Close (x)

Posted: Tue Sep 25, 2018 11:48 pm
by Alexander Riedel
Search for "Cancel" in your script. Is it somewhere in there?

Re: Messagebox after Close (x)

Posted: Wed Sep 26, 2018 12:10 am
by PanklIT
No nothing - just one but that is used in an if statement.

Strange thing - i have a check in my startup.pss if a module is installed - and when the module is not installed a messagebox is displayed and when i close this message box with the (X) i get "OK":

Image

Re: Messagebox after Close (x)

Posted: Wed Sep 26, 2018 12:26 am
by PanklIT
Ok, it also happens with a Quit Button with "$MyForm.close()" - strange ..

Re: Messagebox after Close (x)

Posted: Wed Sep 26, 2018 12:34 am
by PanklIT
Nevermind i, might, have found the solution:

In the startup.pss i called the MainForm only with "Show-MainForm_psf" - i checked the templates and i changed that to:

Code: Select all

		if ((Show-MainForm_psf) -eq 'OK')
		{
			
		}
Now its working :)