Source language: Translate to:

NEW GLOBAL VARIABLE [ShutdownSource] example.

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

NEW GLOBAL VARIABLE [ShutdownSource] example.

Postby SpiritHorse_ » Thu Jun 01, 2006 6:10 pm

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"
MessageBox "Exit.." "Are you sure you want to close this application." "YES|No" "[exit?]"
If "[exit?]" "=" "1"
SetVar "[ShutdownStatus]" "True"
SetVar "[ShutdownStatus]" "False"

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
User avatar
Posts: 32
Joined: Thu Mar 31, 2005 11:11 pm
Location: New Mexico,USA

Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: No registered users and 0 guests