ith the recent introduction of the Windows Mobile 6 platforms, we are now beginning to see a proliferation of new devices supporting the Windows Mobile 6 Standard (aka Smartphone). Because Windows Mobile 6 Standard devices do not have touch screens, they pose certain challenges when developing applications to run on them. This article will show you how to develop a Windows Mobile 6 Standard application, and at the same time, build a useful RSS Reader application that you can actually use if you have one such device.
Building the User Interface
To get started, launch Visual Studio 2005 and create a new Windows Mobile 6 Standard application. Name the application RSSReader.
Populate the default Form1 with the following controls (see Figure 1):
- TreeView control
- MenuItem controls
Add an ImageList control to Form1 and add three images to its Images property (see Figure 2).
Figure 1. Form1: Populating the default Form1 with the various controls.
Figure 2. Adding Images: Adding three images to the ImageList control.
Set the ImageList property of the TreeView control to ImageList1.
Add a new Windows Form to the project and populate it with a WebBrowser and MenuItem control (see Figure 3).
|Figure 3. Form2: Adding a WebBrowser and MenuItem control to Form2.|
Switch to the code behind of Form1 and import the following namespaces:
Declare the following constants and variable:
Public Class Form1
'---constants for icons---
Const ICO_OPEN As Short = 0
Const ICO_CLOSE As Short = 1
Const ICO_POST As Short = 2
'---file containing the list of subscribed feeds---
Const FEEDS_LIST As String = "\My Documents\Feeds.txt"
'---used for displaying a wait message panel---
Dim displayPanel As Panel