Help Functionality

Snoops

   

 
Migrating to .NET: A Pragmatic Path to Visual Basic .NET, Visual C++ .NET, and ASP.NET
By Dhananjay Katre, Prashant Halari, Narayana Rao Surapaneni, Manu Gupta, Meghana Deshpande

Table of Contents
Chapter 4.  Post-migration Changes


The upgrade wizard does not automatically upgrade the help functionality provided in Visual Basic 6.0 applications. When we upgrade a Visual Basic 6.0 project to Visual Basic .NET, the properties HelpContextId and WhatsThisHelpID and the method ShowWhatsThis are affected by this control.

The way to provide help for Visual Basic .NET applications differs from that in Visual Basic 6.0. The class HelpProvider (residing in the namespace System.Windows.Form ) is used extensively to provide help functionalities for applications developed in the Microsoft .NET Framework. The HelpProvider class is available in the toolbox when Windows Forms applications are in design mode.

To upgrade help functionality in Visual Basic .NET, first the WinHelp file has to be converted to .chm (compiled Hypertext Markup Language, or HTML, file). This has to be done using the Microsoft HTML Help Workshop. The prerequisites for migration are that all the files associated with the WinHelp file should be available in the same directory. The steps taken are as follows :

  1. Open HTML Help Workshop and create a new project.

  2. Select the Convert WinHelp Project option.

  3. Specify the names of the existing WinHelp project files and the new project to be created.

  4. Click on Finish.

The tool converts the existing WinHelp file into a new project file. Compile the project to generate the .chm file and other associated files such as the index ( .hhk ) and the HTML files (topic files) and ensure that all the files are saved. After successful generation of the .chm file, the following steps need to be followed:

  1. Open the index ( .hhk ) file.

  2. Select each keyword, click on edit information, and ensure that it is pointing to the correct HTML (topic) file.

  3. If not, change the URL to the correct location.

  4. Save all the files and recompile the project.

Now, perform the following steps on the Visual Basic .NET project:

  1. Open the Visual Basic .NET project.

  2. On the main form, add the HelpProvider control.

  3. Change HelpNameSpace property to point to the new .chm file.

  4. Go to each field's property page.

  5. Change the Helpkeyword to the name of the keyword in the index.

  6. Set HelpNavigator to Keywordindex.

  7. Set ShowHelp to True.

  8. Save the changes.

  9. Run the project. Clicking F1 on each field will point to the right help topic file.


Snoops

   
Top


Migrating to. NET. A Pragmatic Path to Visual Basic. NET, Visual C++. NET, and ASP. NET
Migrating to. NET. A Pragmatic Path to Visual Basic. NET, Visual C++. NET, and ASP. NET
ISBN: 131009621
EAN: N/A
Year: 2001
Pages: 149

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net