Click here to Skip to main content
Click here to Skip to main content

Help File Integration in Windows Mobile Pocket PC

, 8 Jan 2009 CPOL
Rate this:
Please Sign up or sign in to vote.
Help file integration with Windows Mobile applications programmatically.



This article is helpful for Windows Mobile, Smart Device application developers, regarding how to integrate help files programmatically to a targeted device. To develop help files, we have to follow some steps which I have described below.

The .NET Compact Framework allows users to register custom application Help files in Pocket PC's Help systems. It provides access to the Windows CE Help program using peghelp.exe, to display custom application Help files within Windows Mobile Pocket PC applications.

The Solution

How can we create and integrate a Help files in Windows Mobile Pocket PC applications? To create and integrate a help file in Windows Mobile Pocket PC applications, we will follow the steps given below:

Step 1

First, we will create a help file including the help topics that we want to show in our application. Create an HTML file using some specific tags. For example, we are creating "DEMO-HELP.htm" to be integrated as a Help file in our application.


Note: you can find a sample HTML help file to download from the top of this article.

Step 2

We now have to put this (DEMO-HELP.htm) file in our Windows Mobile Pocket PC device/emulator's \windows directory.

Step 3

Step 3 is achieved programmatically.

The Help file needs to be registered in Pocket PC 's Help File System. To install your Help file on the Pocket PC Help Systems, we have to create a shortcut file in the \Windows\Help folder. Create a shortcut to "DEMO-HELP.htm" in the \Windows\Help folder.

How to create a shortcut to "DEMO-HELP.htm"?

Create a text file on you PC and write 16#\windows\DEMO-HELP.htm to it and save this file using the same name as the Help file with a .lnk extension (DEMO-HELP.lnk). Now, you can put it in the \Windows\Help folder.

You can now check out the application Help integration successfully with the device help system. Tap Help from the Start menu. If your Help is not already displayed, choose All Installed Help from the View menu. Your Help should be included alphabetically in the list.

Code snippet for step 3

private bool CreateLinkHelpFile()
    bool isLinkFileCreated = false;
        if (!System.IO.File.Exists(LINK_HELPFILE_PATH))
            System.IO.StreamWriter sw = 
                    new System.IO.StreamWriter(LINK_HELPFILE_PATH);
            sw.Write("16#" + HELPFILE_PATH);
            sw = null;
            isLinkFileCreated = true;
            isLinkFileCreated = true;
    catch (Exception ex)
        MessageBox.Show("Link file does not create.", "CreateLinkHelpFile");
    return isLinkFileCreated;

LINK_HELPFILE_PATH is a variable which is assigned with the @"\Windows\Help" folder path. And it means insert the name of the Help file by the number of characters in the path and the number sign (#). This should be the only line in the file.

protected override void OnHelpRequested(HelpEventArgs e)
       if (System.IO.File.Exists(HELPFILE_PATH))
           Help.ShowHelp(this, HELPFILE_PATH);
           MessageBox.Show("Help File Not Found", "Help Intigration");
    catch (Exception ex)
       MessageBox.Show(ex.Message, "OnHelpRequested");

Here, HELPFILE_PATH is a variable which is assigned with the @"\windows\DEMO-HELP.htm" HTML help file.

Points of interest

After installing the application, you are able to view the application help on your device:







This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior) WmDev Technology
India India
Pavan is a Senior software developer, and has been in the industry since August 2005. He has experience in Windows Phone 7, Windows Mobile with Compact Framework, Python for S60, C#.NET, VB.NET, Windows Forms, ASP.NET, WCF, Silverlight, JavaScript and HTML.
Follow on   Twitter

Comments and Discussions

GeneralWindows CE 5 Pinmemberjansen842127-Oct-09 2:07 
GeneralCreating a link to help file Pinmemberjansen842126-Oct-09 23:03 
GeneralRe: Creating a link to help file Pinmemberjansen84214-Nov-09 2:43 
QuestionHow to display this help from within the application? Pinmemberyoavgur29-Sep-09 7:30 
AnswerRe: How to display this help from within the application? PinmemberPavanPareta29-Sep-09 20:52 
GeneralRe: How to display this help from within the application? Pinmemberyoavgur29-Sep-09 22:43 
GeneralRe: How to display this help from within the application? Pinmemberyoavgur3-Oct-09 23:08 
GeneralGood stuff PinmemberDr.Luiji17-Aug-09 7:33 
GeneralRe: Good stuff PinmemberPavanPareta26-Aug-09 9:45 
Generalthe number before # Pinmemberniktana17-Feb-09 21:49 
GeneralRe: the number before # PinmemberPavanPareta17-Mar-11 20:41 
Generalnice article but PinmemberRupesh Kumar Swami14-Jan-09 2:42 
GeneralRe: nice article but PinmemberPavanPareta14-Jan-09 18:34 
GeneralGood one... PinmemberRajesh Ramachandra13-Jan-09 0:52 
Generalgood job done Pinmemberpramodverma13-Jan-09 0:51 
GeneralEfforts Appreciated PinmemberAradhya Agarwal13-Jan-09 0:00 
GeneralRe: Efforts Appreciated PinmemberPavanPareta13-Jan-09 0:06 
GeneralReally a nice Article Pinmember~Khatri Mitesh~12-Jan-09 20:22 
GeneralIf I used compact framework PinmvpSacha Barber12-Jan-09 2:59 
GeneralRe: If I used compact framework PinmemberPavanPareta12-Jan-09 4:19 
GeneralVery interesting article! PinmemberVesko Kolev10-Jan-09 4:12 
GeneralRe: Very interesting article! PinmemberPavanPareta12-Jan-09 4:19 
GeneralHelp file integration Pinmemberyuvraj.raj10-Jan-09 1:39 
GeneralRe: Help file integration PinmemberPavanPareta12-Jan-09 4:54 
Generalhi PinmemberRavenet10-Jan-09 1:20 
GeneralRe: hi PinmemberPavanPareta12-Jan-09 4:24 
GeneralIts Good Artical for integration of customised help with default help PinmemberRajSharma.engr9-Jan-09 23:32 
GeneralGood one .. PinmemberMember 38496769-Jan-09 21:58 
GeneralUseful Article PinmemberNikhil Airun8-Jan-09 23:45 
Appreciate your efforts for detailed explanation of the subject. Adding snapshot/code snippet adds more clarity for actual usage. Thx! Smile | :)
GeneralRe: Useful Article PinmemberPavanPareta12-Jan-09 4:52 
GeneralExcillent Contents PinmemberPankaj Kumar Gupta8-Jan-09 22:04 
GeneralRe: Excillent Contents PinmemberPavanPareta12-Jan-09 4:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150331.1 | Last Updated 8 Jan 2009
Article Copyright 2009 by PavanPareta
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid