bool ShowWnd(int, bool)

Shows and activates the specified window

Security

Trust Level Required: Full Trust

Parameters

Name Description
hWnd int
The handle of the window to show.
noActivate (Optional) bool
True to show the window. Defaults to false.

Return

True on success

Remarks

IMPORTANT: While KioWare can be used to open 3rd party applications it cannot guarantee any security of your kiosk while these applications are in use.

It is also possible to show a taskbar with all open apps via the User Interface section of the Configuration Tool. With KioWare running in shell mode, as is recommended, the start menu will still be disabled.
Activation is optional. Activating the window will take focus away from the main KioWare window. This can be a security issue.

Examples


//this example is intended to run in the CustomToolbarCode.js file in the UserData directory
//The purpose is to run a process for the duration of each user session
var _onSessionBegin = OnSessionBegin, _onSessionEnd = OnSessionEnd, pid;
var wnd = null;
window.OnSessionBegin = function(sessId){
	if(!pid) pid = KioUtils.Execute('notepad.exe');
	var wnd = null;
	while (!wnd) {
		wnd = KioUtils.GetProcMainWnd(pid);
		if(wnd) KioUtils.ShowWnd(wnd);
	}
	KioUtils.BringWndToFront(wnd);
}

window.OnSessionEnd = function(){
	KioUtils.CloseWnd(wnd);
	_onSessionEnd();
	_sessId = null;
}

Requirements

KioWare for Windows version 8.5 or greater.