Posts tagged ‘Programming’

RDM_Keepbusy has been updated

I fixed a bug in RDM_KeepBusy. It worked only for the first session and not after close/open another session. Please always use the subversion code.

Mobile Development: A remote cpu monitor and cpu usage analysis

cpumon2 and cpumonRcv

Although this project is not yet finished, the main function works very well: viewing cpu usage remotely and capture data to database for later analysis.

Some of the ideas and code is inspired by a cpu usage article at http://www.codeproject.com/Articles/159461/Mobile-Processor-Usage. Further on I got more questions the last days like “Why is app x running slow?” or “When I start that app, the system gets slow and taskmanager shows a high cpu usage.”.

Here are two tools to capture cpu usage of a windows mobile device remotely via a TCP/IP connection.

cpumon2   cpumonRcv

excel-barchart

Before you read on, the code is by far not perfect and there are still many improvements possible. But if you need a working remote cpumon, here we go…

Continue reading ‘Mobile Development: A remote cpu monitor and cpu usage analysis’ »

Mobile Development: Watch the power of your device, think green

This is a very simple application to show the values of GetSystemPowerStatusEx2 in live view.

That enables you to see how much power is drawn of the battery if you switch WiFi on or off for example.

  

On industrial devices you can also check the power consumption of special modules like a barcode scanner.

Continue reading ‘Mobile Development: Watch the power of your device, think green’ »

Windows Mobile: CF how to catch F1 and F2 in WEH

Before WEH and Windows Mobile 6 it was easy to catch all keys including the function keys in a Compact Framework (CF) application, you simply had to use Allkeys(true) and Form.Keypreview=true.

Actually, with Windows Embedded Handheld (WEH) or Windows Mobile 6.5.3 the above will not work for the F1 and F2 key. There are simply no KeyDown and KeyUp events reaching your CF application.

Windows Mobile 6.1 demo

with IMessageFilter active, F1 and F2 can be captured

After removing IMessageFilter no F1 and F2 keys are being captured

With WEH Microsoft moved the Start button from the taskbar at top to the menu bar at bottom. Further on, the menu bar is now using graphic tiles to display the top menu, the Close and OK/Done option. The OK/Close button also moved from taskbar to menu bar. Additionally the menu bar is higher than in Windows Mobile 6.1. That leaves less space for your client window.

Due to the above changes in the UI, the window messages are routed in another unknown way and normally a CF application does not get F1 and F2 key messages. Possibly the CF main message queue gets notification messages but these are handled internally by the CF runtime, you only see the menus are working.

Continue reading ‘Windows Mobile: CF how to catch F1 and F2 in WEH’ »