Archive for the ‘Programming’ Category.

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: Analyze QRcode content on Windows Mobile

QRreaderWH6

You possibly know these QRcodes that make your phone open a web site or add a contact. Unfortunately there is no such function on Windows Mobile and I just wrote a demo of such a functionality:
A demo app to show how these nifty QR barcodes are encoded to hold URLs, business cards, appointments or other data. Further on, the application shows how to use QR code reading and import or launch the appropiate application for the QRcode content. The demo uses ZXing.Net to encode text into a QRcode barcode image but ZXing or ThoughtWorks code to decode QRcode images as the latter was easier to use. Then there is a list of sample encodings to show you how to specify a vcard or SMS or others to be encoded into a readable QRcode.

After start of the app and then simply click in the type list at the top and select for example “vcard”. In the sample field you can see how a vcard is to be encoded:

BEGIN:VCARD
N:Heinz-Josef Gode
ORG:ACME GmbH
TITLE:Systems Engineer
TEL:0123456789
URL:www.hjgode.de/wp
EMAIL:heinz-josef.gode@somewhere.com
ADR:Musterstrasse 1
NOTE:Support Engineer
END:VCARD

Now click [decode&encode] and you get the QRcode image and the cleaned content:

  

Continue reading ‘Mobile Development: Analyze QRcode content on Windows Mobile’ »

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: 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’ »