Development

Writing “Hello World” program for Windows Phone 7

Windows Phone 7 (WP7) is a cool new mobile platform from Microsoft. Developers can use Silverlight, XNA Framework and of course .NET compact framework for developing applications for WP7. What do you need To get started, download and install the following tools on your Windows 7 or Vista PC. http://www.microsoft.com/downloads/details.aspx?FamilyId=2338b5d1-79d8-46af-b828-380b0f854203&displaylang=en Installation includes Visual Studio 2010,…

Read More

Writing "Hello World" program for Windows Phone 7

Windows Phone 7 (WP7) is a cool new mobile platform from Microsoft. Developers can use Silverlight, XNA Framework and of course .NET compact framework for developing applications for WP7. What do you need To get started, download and install the following tools on your Windows 7 or Vista PC. http://www.microsoft.com/downloads/details.aspx?FamilyId=2338b5d1-79d8-46af-b828-380b0f854203&displaylang=en Installation includes Visual Studio 2010,…

Read More

No Application.StartupPath in .NET CF! There is a solution though…

Too bad there is no straight-forward way in net CF for an application to determine its folder path from where it was launched. But following code works just fine. string assembly = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase; string currentFolderPath = System.IO.Path.GetDirectoryName(assembly); Enjoy… Share this:

Read More

Simulating key presses in your program with keybd_event function

Out of need or curiosity you might want to know how to send key presses from your native application. The core of the solution involves calling keybd_event() function which has the following prototype. VOID keybd_event(BYTE bVk, BYTE bScan, DWORD dwFlags, DWORD dwExtraInfo); bVk is the virtual-key code of the character. bScan is the hardware scan…

Read More

Determining IP Address of a Windows Mobile device

Code to determine IP addresses of adapters on a Windows Mobile device, using IPHelper APIs. Add Iphlpapi.lib to linker settings. #include “Iphlpapi.h” PIP_ADAPTER_INFO pinfo = NULL; ULONG OutBufLen = 0; DWORD dwRet = GetAdaptersInfo(NULL, &OutBufLen); if (dwRet == ERROR_BUFFER_OVERFLOW) { pinfo = (PIP_ADAPTER_INFO)malloc(OutBufLen); dwRet = GetAdaptersInfo(pinfo,&OutBufLen); while (pinfo != NULL) { if (dwRet==ERROR_SUCCESS) { PIP_ADDR_STRING…

Read More

Programmatically display system tray icon on Windows Mobile

As a Windows Mobile user you would have seen some icons near to the bottom right corner of the Today screen. These icons give users ability to easily launch the application or show an menu with more choices. This post discusses the steps and code to put your own icon in the system tray. I…

Read More

Debugging CeRAPIInvoke Calls

RAPI (Remote API) dlls are loaded by rapiclnt.exe on the Windows Mobile device when CeRapiInvoke API is called by the desktop application. CeRapiInvoke is a general-purpose API to remotely execute a function on a Windows Mobile device that is connected to the desktop over ActiveSync. To debug your RAPI dll, do the following. 1. Launch…

Read More

Create full screen application in .Net CF

Applications can use the screen real estate to their benefit by running in full screen mode. If you are developing your application in .NET CF, there are 2 ways to make it full screen. In Code Put the following code into your form’s Load() method like below. private void Form1_Load(object sender, EventArgs e) { this.FormBorderStyle…

Read More

Windows Mobile Shortcuts

Shortcuts makes it easy for users to launch applications. Shortcut files have “.lnk” extension and they take up very little storage space. Shortcuts contain information about the application to launch along with any parameter information. They are really handy if predetermined values need to be passed to the application as command line parameters. How to…

Read More