Monday, March 30, 2009

Useful tool for the presentation of your mobile application

"Real-Time Remote Control" and "Presentation Tools" will be very useful.

Pocket Controller Pro

Wednesday, March 11, 2009

Random Number Generator in C++

Random Number Generator in C++

See here

Sunday, March 1, 2009

How to run windows mobile application as a background process?

To send your application to the background, you can use Hide() function.

For example, when you have a form (myForm) to hide, call this, myForm.Hide(). This results in that myForm.visible is set with "false".

To check that your application is really running on background, let's go to the "Settings -> System tab -> Memory -> Running programs tab".

Unfortunately, you cannot find your application on the list. (But, actually your application is running as a backroung process.)

Now, let's check with "Remote Process Viewer". Click "Microsoft Visual Studio 2005 -> Visual Studio Remote Tools -> Remote Process Viewer". (You need to connect your mobile device to your computer.)

You can surely find your application's name on the Process list. To kill it, click "X" icon on toolbar menu.

This is a drawback when you use Hide() function to send your application to the background.

Here is another way to overcome this problem.

It is to use the Native function "ShowWindow()" with the ‘Minimized’ property:

static extern int ShowWindow(IntPtr hWnd, int nCmdShow);
const int SW_MINIMIZE = 6;
public void Hide()
ShowWindow(myForm.Handle, SW_MINIMIZE);


How to capture screenshots of mobile device or emulator

Here is a procedure to follow to take a screenshot.

1. Open "Microsoft Visual Studio 2005 -> Visual Studio Remote Tools -> Remote Zoom In".

2. Select one on a "Select a Windows CE Device" dialog, which is the thing you want to connect. Make sure a device connected to your computer.

3. You will see the screenshot. If you want to take another screenshot, click "Target -> Refresh" on the menu of the Remote Zoom In, or press F5 key.

4. Now, you can save the screenshot as an image (BMP). Select "File -> Save As".