Page 1 of 1

NEW GLOBAL VARIABLE [ShutdownSource] example.

PostPosted: Thu Jun 01, 2006 6:10 pm
by SpiritHorse_
another great use of the new global variable "[ShutdownSource]"

have and option in your pub parsay a checkbox with the text of .....

"Don't close program if i click the close button" > varible [exit_on_close]

now using the "IfEx" command do something like

IfEx "([ShutdownSource] = CloseButton) AND ([exit_on_close] = Checked)"
SetVar "[ShutdownStatus]" "False"
SetVar "[WindowState]" "Minimized"
Else
MessageBox "Exit.." "Are you sure you want to close this application." "YES|No" "[exit?]"
If "[exit?]" "=" "1"
SetVar "[ShutdownStatus]" "True"
Else
SetVar "[ShutdownStatus]" "False"
Endif
EndIf

Basically turning the Close button into a Send to tray or Minimize button
But Still allowing all other methods of Exiting the application to proceed.

here is a very basic example
http://spiritus.cabspace.com/close_opts.rar