OnClosing event

The OnClosing event occurs just before the Smartframe executable closes.

object.OnClosing = [eventHandler]

Where object is Smartframe, and eventHandler is the code to execute.

Applies To

Smartframe

Version Support

Introduced in version 11.0.5.

Use

The OnClosing event handler allows the user to hook into the OnClosing event of the top-level Smartframe window. This is useful if you want to execute some custom functionality in your template or the Smartframe Newlook Control each time Smartframe is closed.

EXAMPLE:

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

// Called when SmartFrame is about to close

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

SmartFrame.OnClosing = OnApplicationClosing;

function OnApplicationClosing()

{

// Place code here to run on Smartframe exit

 

/*

var result = confirm("Do you want to exit SmartFrame?");

 

if (result != true) {

    return false;

}

*/

// Return 'true' to exit Smartframe

// Return 'false' to cancel Smartframe exit

return true;

}

See Also

Customizing Smartframe templates | Close method | Smartframe Newlook Control API | OnFunctionKeyChanged property | OnReceived property | OnSent property | OnStatusChanged property | OnTitleChanged property

Applies To

Smartframe


© 2004-2021 looksoftware. All rights reserved.