C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Training   ASP.NET Web Hosting    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

Play Silverlight Games or Submit your Silverlight applications and earn 90% AdSense revenue.

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Resources » Code Snippets » C# Syntax »

Creating an HTML Help File in .Net


Posted Date: 22 Oct 2008    Resource Type: Code Snippets    Category: C# Syntax
Author: sivaMember Level: Silver    
Rating: Points: 3



1. Using Windows Explorer or My Computer, create a folder named cis
2. Inside of the cis folder.
3. Start Notepad and create a Cascading Style Sheet file to format the body tag and the main title of the pages. Here is an example:
body
{
font-size: 10pt;
color: black;
margin-top: 0pt;
margin-left: 0pt;
font-family: Verdana, Tahoma, Arial, Sans-Serif;
}

.maintitle
{
font-weight: bold;
font-size: 24pt;
color: blue;
font-family: Garamond, Georgia, 'Times New Roman' , Serif;
}
4. Save the file as cic.css in the cis folder
5. Start another file with the another contents
6. Save it as introduction.htm
7. Start another file with the another contents
8. Save it as mainform.htm
9. Start another file with the another contents
10. Save it as calculation.htm
11. Start another file with the another contents
12. Save it as index.htm
13. Start HTML Help Workshop
14. On the main menu of HTML Help Workshop, click File -> New
15. In the New dialog box, make sure Project is selected and click OK
16. In the first page of the New Project wizard, click Next
17. In the second page of the wizard, click Browse
18. Locate the cis folder you created and display it in the Save In combo box
19. Set the File Name to cisoh
20. Click Open
21. In the second page, click Next
22. In the third page, read the text. Click the HTML files (.htm) check box and click Next
23. In the fourth page, click Add
24. In the Open dialog box, press and hold Ctrl. Then click each htm file to select them all
25. Click Open
26. In the fourth page, click Next
27. In the last page of the wizard, click Finish
28. In HTML Help Workshop, click the Contents tab
In the dialog box that displays, make sure the first radio button is selected
29. Click OK
30. In the Save As dialog box, change the name of the file to CISContents
31. Click Save
32. Click the Insert a Heading button
33. In the Table Of Contents Entry dialog box, in the Entry Title text box, type Clarksville Ice Cream and click Add
34. In the Path Or URL dialog box, select the Clarksville Ice Cream - Home and click OK
35. Click OK
36. Click the Insert A Page button
37. In the message box that displays, click No
38. In the Entry Title text box, type Introduction and click Add
39. In the Path Or URL dialog box, select the Overview of Clarksville Ice Cream and click OK
40. In the Table Of Contents Entry dialog box, click OK
41. In the same way, create new pages under the Introduction heading using the following table
42. In HTML Help Workshop, click the Index tab. In the dialog box that comes up, make sure the top radio button is selected
43. Click OK
44. Set the name of the file to CISIndex and press Enter
45. Click Insert A Keyword
46. In the Keyword text box, type Calculation and click Add
47. In the Path Or URL dialog box, click Difference Calculation and click OK twice
48. In the same way, create new keywords using the following table (sometimes you may receive a message box asking whether you want to create the keyword above the other; it doesn't matter, for this exercise, whether you click Yes or No):
49. Click the Sort Keywords Alphabetically button
50. Click the Project tab
51. Click the Add/Modify Window Definitions button
52. Set the name to MainWnd and press Enter
53. Set the Title Bar Text to Clarksville Ice Cream
54. Click the Buttons tab then click the Home and the Locate check boxes
55. Click the Position tab
56. Set the Width to 800 and the Height to 600
57. Click the Files tab
58. Set the Default and the Home choices to index.htm
59. Click the Navigation Pane tab
60. Click the Search Tab and the Advanced check boxes
61. Click OK
62. When the Resolve Window Definition wizard comes up, in the first page, make sure the window defined previously is selected in the Window Type combo box and click Next
63. Click the Compile Full-Text Information check box
64. Click Next
65. Click Finish
66. To create the help file, click the Save All Files And Compile button
67. When the compilation is over, close the HTML Help Workshop window
After creating the HTML Help application, you can use a HelpProvider control to connect it to your application. The HelpProvider control is equipped wit the HelpNamespace provider. This property allows you to specify the application that contains the help application. Besides the HelpNamespace property, the HelpProvider control provides various methods to manage help.
Providing Online Help to an Application
1. Open Windows Explorer or My Computer
2. In the cic folder, copy the cicoh.chm file to the clipboard and paste it in the folder of the current project (CIS1)
3. Display the main form
4. On the Toolbox, click HelpProvider and click the form
5. In the Properties window, change its Name to cicHelp and click HelpNamespace
6. Click the ellipsis button of the HelpNamespace property
7. From the CIC1 folder of the current project, select the cicoh.chm file
8. Click Open
9. On the main menu of the form, click Help and double-click Contents
10. Implement the event as follows:
private void menuItem4_Click(object sender, System.EventArgs e)
{
Help.ShowHelp(this, this.cicHelp.HelpNamespace);
}




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Creating an HTML Help File in .Net  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Using Regex to remove multiple instances of a character
Previous Resource: Open File/Exe
Return to Discussion Resource Index
Post New Resource
Category: C# Syntax


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use