November 18, 2010, 17:03 -
Hello
here is one other way to write a kios mode .NET application using a technique called SubClassing. The idea was born by a comment of redwolf2222 on this blog about how to Hide Start and Close buttons on Windows Mobile 6.5 devices. Redwolf2222 also provided a code snippet. Unfortunately it was incomplete and so I wrote my own class.
Disable clicks on Start and Close button
The demo project shows one dialog with two check boxes and you can easily test the function. If “StartButton Disabled” or “Close Button disabled” is checked, you cannot ‘click’ the corresponding button any more:

You still ‘click’ the buttons but the subclassed window will not ‘execute’ your click. The buttons are part of the toolbar32 window which is a child of the menu_worker window. So first we have to follow the window tree.
Find the right window
/// <summary>
/// SubClassing: Install the wndproc hook
/// </summary>
/// <returns></returns>
private bool hookWindow()
{
//find taskbar
IntPtr hWndTaskbar = FindWindow("HHTaskbar", IntPtr.Zero);
if (hWndTaskbar == IntPtr.Zero)
return false;
//enable the taskbar, not realy necessary
EnableWindow(hWndTaskbar, true);
//already installed?
if (oldWndProc == IntPtr.Zero)
{
//find the menu_worker window
IntPtr hwndMenu_Worker = FindWindow("menu_worker", IntPtr.Zero);
if (hwndMenu_Worker != IntPtr.Zero)
{
//get the child window which has the buttons on it
IntPtr hwndToolbar = GetWindow(hwndMenu_Worker, GetWindow_Cmd.GW_CHILD);
if (hwndToolbar != IntPtr.Zero)
{
_mHwnd = hwndToolbar; //store to remember
SubclassHWnd(hwndToolbar); //subclass the wndproc
}
}
}
return true;
}
Subclassing
Now, as we have the window handle, the subclassing can be started:
Continue reading ‘Mobile Development: Disable Windows Mobile 6.5 Start and Close Button’ »
Tags:
6.5.3,
Close Button,
DotNet,
hook,
kiosk mode,
Programming,
sender-as-rectangle-windows-ce,
Start Button,
Subclassing,
taskbar,
windows mobile,
WM65 Category:
CodeProject,
kiosk mode,
Programming,
Tools,
Utilities |
Comments Off on Mobile Development: Disable Windows Mobile 6.5 Start and Close Button
November 6, 2010, 08:36 -
Although Intermec provides a control panel and an API to remap keys for Intermec Mobile Computers these tools only support normal remappings. This means for example you can remap a hardware key to produce a virtual key code. But you cannot map a key to the other great possibilities of the keyboard driver:
- switch the keyboard plane (shiftkey)
- map as modifier key
- map as rotate key (one that produce abc depending on how often you press is)
- multikey that produces a sequence of key strokes
- event key, one that fires a named event pair (like the scan button does)
- a function key that executes a function inside a DLL
I also added classes to manage the used tables as for example MultiKeys, ShiftKeys, RotateKeys, ModifierKeys and so on.
As an example on how the the USB codes are layed out on a device. Unfortunately I only have mappings of this device and not for the others. Therefor you can only suggest the key to remap by the printing on the key.

There is no support in the Intermec tools to remap directKeys. For example the side buttons of a CN3 or CN4 or the PTT button of the CK3 are not managed via the usb keyboard driver, these are managed by a direct keyboard driver. ITCKEYBOARD enables you to remap this keys thru an API.
Continue reading ‘ITCKeyboard: a class to manage ITC keyboard mappings’ »
October 21, 2010, 08:23 -
I am running MonoDevelop 2.4 on my acer aspire one x150 netbook running Ubuntu 9.04 (Jaunty).
From time to time I needed to write and run little test applications in C#. As I am alsos running another PC with Visual Studio 2005 and 2008, I like these for providing me a WinForm template, so I dont have to start from scratch.
Unfortunately MonoDevelop does not come with a WinForm template and I searched the internet on how to extend the templates provided by MonoDevelop to add a WinForm template. Although I found some resources on how to add templates to MonoDevelop, none of them worked as described.
Adding a template by using addins directory
Some sources state you can add templates by creating two files within the MonoDevelop home dir. For example adding HelloTemplate.xpt.xml and MyTemplates.addin.xml to “~/.config/MonoDevelop/addins”. I tried this approach, but it did not work as a WinForm project template.
Adding a template by using a packed template
Similar to the previous attempt but using mdtool to pack the files:
mdtool setup pack addins/addin.xml -d:addins
and
mdtool setup rep-build addins
where you finally get a mpack file with your xml template files. Unfortunately this did also not work for project templates.
Adding a template to the sources and recompile
As I already had the MonoDevelop sources as I have compiled and installed MonoDevelop 2.4 from sources, I looked for the existing templates and added my WinForm project and file template.
Screenshot Start New WinForm project

Screenshot Add New WinForm file

The source templates for CSharp are located on my netbook at: “/usr/local/src/monodevelop-2.4/src/addins/CSharpBinding/templates”. The Makefile references the template files in this directory. I had to add two template files to the directory and to the Makefile and the file CSharpBinding.add.xml. Then I did a make within the directory /usr/local/src/monodevelop-2.4/src/addins/CSharpBinding and then a “sudo make install” and finally got my WinForm project and file template available in MonoDevelop.
Continue reading ‘Monodevelop: Howto add a WinForm project and file template’ »
October 15, 2010, 18:41 -
Hello
do you also like the binary watches from IO?

OK, I like them and was inspired to make some binary clock for the Windows Mobile taskbar.

The time shown here is 14:23 displayed as binary dots. The top row (red) shows the hours in 24h format. The second row shows the minutes and the bottom row shows the seconds.

What you see here is encoded in binary:

01110 is equal to 0*16 1*8 1*4 1*2 0*1 = 8 + 4 + 2 = 14
10111 is equal to 1*16 0*8 1*4 1*2 1*1 = 16 + 4 + 2 + 1 = 23
00100 is equal to 0*16 0*8 1*4 0*2 0*1 = 4 = 4
So you see, it shows the time is 14:23:04
Continue reading ‘Mobile Development: A binary clock for the taskbar’ »