Kiosk Mode Library for Windows Mobile

Some times when developing Windows Mobile Application  you might want to make sure that users cannot navigate to and use any of the other programs except your program . This means that the windows start button in the taskbar must be disabled .

There are some predefined functions in the coredll.dll in Windows Mobile

<DllImport("coredll.dll")> _
Public Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr End

Function  <DllImport("coredll.dll")> _
Public Shared Function ShowWindow(ByVal hWnd As IntPtr, ByVal visible As Integer) As IntPtr End Function

To Disable the Start Button , you can use

ShowWindow(FindWindow("HHTaskBar", Nothing), 0)


Note the HHTaskBar . This is a windows handle for the task bar , but when we hide this , this will hide the entire window along with the X button .

Instead , you can use the EnableWindow function with false as parameter to disable the window rather than hiding it or even the function SHFullScreen with the parameter ( SHFS_SHOWTASKBAR , SHFS_HIDETASKBAR,SHFS_SHOWSIPBUTTON,SHFS_HIDESIPBUTTON,SHFS_SHOWSTARTICON , SHFS_HIDESTARTICON ) .

Some times this might be more troublesome , if you want to disable the same on the other programs too like Calculator etc …but still enable the X button .

Here’s a simple Kiosk Mode Library that i found was simple and easy to use from the Windows CE Programming Blog

The functions are implemented in a Dll file (StartLock.dll) that is written using Embedded Visual C++ 4.0 , which means the functions are accessible from any managed language code like VB.NET / C# .

Simple isn’t it ?.

The list of functions supported by the library includes .

1. LockStartMenu();

2. UnlockStartMenu();

3. LockStartBar();

4. UnlockStartBar();

5. Lockdown(TCHAR*);

6. Unlockdown();
You can find more information on downloading and using the library in the Windows CE Programming’s
Mobile Development: Yet another kiosk mode library

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

No Responses

Leave a Reply to A pleasant surprise for Windows Phone 7 Developers | Ginktage Cancel reply


Interesting BlogPosts to read

Download - Pokemon Go for for Windows 10 (Third Party app)
Pokemon Go is one of the popular AR games for android and iOS devices and now , the game is made ava...
Open Wordpad from command line in Windows
You can use the command "Write" from command line in Windows to open the WordPad application.D:\>...
Israel Mobile Summit 2016 at Tel Aviv-Yafo
Mobile developers and enthusiasts from Israel. Here's an event for you attend. The Israel Mobile Sum...