This blog is about the dotnet.all types of codes,news about dotnet including asp.net,vb.net,c# and know about new dotnet technology.programing in asp.net,vb.net,c#, ajax, AJAX tech support for .net and discuss the new technology in dotnet.ncluding asp.net,vb.net,c# and know about new dotnet technology.programing in asp.net,vb.net,c#, ajax, AJAX tech support for .net and discuss the new technology in dotnet.asp.net programming,dot net programming,dotnet programs,dotnet source code,source code.

Free Hosting

Free Hosting

Tuesday, November 11, 2008

Adding Help To Applications in C#(Csharp)

With Help class, our applications can display either HTMLHelp or Win32 Help.
Help class has 3 main static methods : ShowHelp(), ShowHelpIndex() and ShowPopup(). In this article, I will show how to use these methods.

1. ShowHelp method : displays the content of a Help file.



public static void ShowHelp(Control parent, string url);
public static void ShowHelp(Control parent, string url, string topic);

Parameters :
- parent : a control that identifies the parent of the Help dialog
- url : the path to the HTMLHelp or Win32 Help file
- topic : the topic to display. This value references the page to display (HTMLHelp file) or the numeric value of the topic's ID (Win32 Help file).



Example :
- Display the content of 'TestHelp.chm' file
Help.ShowHelp(this,"TestHelp.chm");
- Display 'Topic1' of 'TestHelp.chm' file
Help.ShowHelp(this,"TestHelp.chm","topic1.htm");

2. ShowHelpIndex method : displays the index of a Help file.


public static void ShowHelpIndex(Control parent, string url);
Parameters :
- parent : a control that identifies the parent of the Help dialog
- url : the path to the HTMLHelp or Win32 Help file


Example :
Display the index of 'TestHelp.chm' Help file
Help.ShowHelpIndex(this,"TestHelp.chm");


3. ShowPopup method : displays a Help pop-up window.


public static void ShowPopup(Control parent, string caption, Point location);
Parameters :
- parent : a control that identifies the parent of the Help dialog
- caption : the string to display in the pop-up window
- location : the location to display the pop-up window


Example :
Display the pop-up window at index of 'TestHelp.chm' Help file
Help.ShowPopup(this,"This is a Help pop-up",new Point(100,100));


CLICKHERE TO DOWNLOAD SOURCE CODE

0 comments:

dotnet(.Net) Project Source code Downloads and Tutorials

Email Subscrption



Enter your email address:

Delivered by FeedBurner

Feedburner Count

Blog Archive

Unique Visitor

Design by araba-cı | MoneyGenerator Blogger Template by GosuBlogger