Posts tagged ‘subclass’

Mobile Development: Move your Form

Although I do not yet know a use case for this, here comes some code to make your smartdevice forms being moveable.

As default, Windows forms on mobile devices are created always as maximized forms. There may be situations, where you need a moveable form. The trick in compact framework is to use SetWindowLong with WS_CAPTION style and apply that to your form.

  

To enable you to experminet more with Window Styles there is another demo enabling to check all known window stlyes with a form. Be warned, setting WS_DISABLED or some other styles will make your form inaccessible.

Continue reading ‘Mobile Development: Move your Form’ »

Mobile Development: Yet another kiosk mode library

Hello

here is another kiosk mode library. It supports disabling clicks/taps on start menu icon and opening the Windows Mobile start menu using the win key (VKLWIN). Additionally there is a function to disable the whole StartMenu bar and one to make a window fullscreen without Done and Close button (uses SHFullScreen).

The functions are implemented in a DLL, so you can easily use them from C/C++, the dot net compact framework (CSharp or VB.NET), Java and so on.

Here is a list of the functions exported by the DLL:

void __stdcall LockStartMenu(); // this will install the hook (subclass the taskbar window)
void __stdcall UnlockStartMenu();   // this will unhook TaskbarWindowProc from taskbar
void __stdcall LockStartBar();  // this disables the whole taskbar
void __stdcall UnlockStartBar();    // this enables the taskbar window
bool __stdcall Lockdown(TCHAR*);    // this will make the application with the window title fullscreen etc
bool __stdcall Unlockdown();    // this will 'normalize' the fullscreen window

I have included a deno application in C and .NET

The left shows normal window ce window and the right the same window after pressing the [Lockdown window].

Continue reading ‘Mobile Development: Yet another kiosk mode library’ »