Transcript

Slide 1 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET Framework

In this session, you will learn to:Create a Help System using HTML Workshop

Implement Help System in .NET applications

Work with built-in components in the .NET applications

Work with user-defined components in the .NET applications

Objectives

Slide 2 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET Framework

A help system within an application assists the user while using the application.

A help system comprises of several help files and components that are created using HTML Help Workshop.

HTML Help Workshop (hhw.exe) is a help-authoring tool provided by Microsoft for creating help systems.

Some files that make up a help system are: HTML files

Graphics and Multimedia files

Help Project files

Contents files

Index files

Help Files

Slide 3 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET Framework

The HTML Help Workshop allows to create a help system with standard features of any help system. The features are:

Table of contents

Index

Help Files (Contd.)

Provides users with a hierarchical view of

the various help topics.

Helps users to quickly search for information

they need.

Slide 4 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET FrameworkJust a minute

What is the extension of a compiled help project file?

Answer:.chm

Slide 5 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET FrameworkDemo: Building a Help System

Problem Statement:You have created an application for a retail store. The application maintains the records of its customers. Before making the final delivery of the application, you want to implement the help system in the application. You need to create the help system using the HTML Help Workshop.

Slide 6 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET FrameworkDemo: Building a Help System (Contd.)

Solution:To build Help system using the HTML Help Workshop, you need to perform the following tasks:

1. Create a project file.

2. Create the HTML topic pages.

3. Create an index.

4. Create a table of contents.

5. Compile and verify the project file.

Slide 7 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET FrameworkProviding Context-Sensitive Help

Context-sensitive help assists users by providing help based on a specific dialog box or a control in a program.

To add context-sensitivity to the application, the various controls in the form need to be linked with the Help file.

To add context-sensitive help to a control, you need to set the following properties for controls:

ShowHelp on <HelpProvider control> to True.

HelpKeyword on <HelpProvider control> to an appropriate keyword for retrieving help.

HelpNavigator property to the required value.

Slide 8 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET Framework

To implement context-sensitive help, you need to perform the following tasks:1. Link your application with a help file.

2. Add context-sensitive help to various form elements.

Providing Context-Sensitive Help (Contd.)

Slide 9 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET FrameworkJust a minute

Which property value of the HelpNavigator property will display the index for a specified topic?1. Index

2. AssociateIndex

3. KeywordIndex

4. Topic

Answer:2. AssociateIndex

Slide 10 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET FrameworkWorking with Pop-up Help

Pop-up help is most effective in modal dialog boxes.

To display Help button on the title bar of a form, you need to perform the following steps:

Set the MinimizeBox and MaximizeBox properties of the form to False.

Set the HelpButton property of the form to True.

Add a HelpProvider control to the form.

Slide 11 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET Framework

A tool tip is a brief message for individual controls on a form.

The message can be displayed by using the ToolTip control present in the Toolbox.

Two of the important properties of the ToolTip control are:Active

AutomaticDelay

Working with ToolTip Control

Is used to set the current status of the ToolTip control. The property can be set to

either True or False. By default, the Active property is

set to True.

Is used to set time in milliseconds after which the

tool tip would appear. By default, the AutomaticDelay

property is set to 500.

Slide 12 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET Framework

There are three properties of the ToolTip control that have values based on the value of the AutomaticDelay property.

These properties are:AutoPopDelay

InitialDelay

ReshowDelay

Working with ToolTip Control (Contd.)

Slide 13 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET FrameworkWorking with Built-in Components in the .NET Applications

A component is a reusable piece of code in binary form, which can be used along with other components.

Slide 14 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET FrameworkTypes of Components

Components can be divided into the following types:Built-in components

User-defined components

Slide 15 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET Framework

Some guidelines for creating a component are:The name of a component class should be short and meaningful.

You can control the use of a component by using proper access level for constructors.

Guidelines for Creating Components

Slide 16 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET FrameworkJust a minute

Name the template, which is used to create a user-defined component.

Answer:Class Library

Slide 17 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET Framework

The .NET Framework provides several components besides the standard controls that are provided in the Toolbox window.

These controls can be added to the Toolbox window by adding reference of the control to the application.

Implementing Built-in Components

Slide 18 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET FrameworkWorking with User-Defined Components in the .NET Applications

A .NET component:is a .NET assembly with a .DLL extension

is a pre-compiled class module

.NET components provide an interface that defines: Properties

Methods

Events

.NET component can contain more that one class that enables to organize the application in a better manner.

.NET components can be categorized as:In-process components

Out-of-process components

Slide 19 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET FrameworkIn-Process Components

In-process components:are loaded and executed within the process space of the host application.

share processor time and memory with their host applications.

Slide 20 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET FrameworkOut-of-Process Components

Out-of-process components run as independent processes in the operating system.

Windows creates a new process and loads out-of-process components into this process.

Slide 21 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET Framework

.NET components are further divided into two different categories. These are:

Nonvisual components

Visual components

The .NET components that do not have a user interface are callednonvisual components.

Out-of-Process Components (Contd.)

Slide 22 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET Framework

.NET components are further divided into two different categories. These are:

Nonvisual components

Visual components The .NET components that have a user interface associated with them are called visual components or user controls.

Out-of-Process Components (Contd.)

Slide 23 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET Framework

In this session, you learned that:Visual Studio.NET allows the creation of three types of help systems:

HTML Help

Pop-up Help

Tool Tips

The HelpProvider control is used to associate a Help file with an application.

The Help file to be associated with the HelpProvider control is specified using the HelpNamespace property of the HelpProvider control.

The HelpKeyword property of a control is used to set the keyword for retrieving help from the Help file specified in the HelpNamespace property.

Summary

Slide 24 of 24Session 10Ver. 1.0

GUI Applications Development Using .NET Framework

A component is a reusable piece of code in binary form that can be used along with the components from other vendors, with relatively little effort.

The types of components are:Built-in components

User-defined components

To create a user-defined component, the Class Library template under the Templates section in the New Project dialog box needs to be selected.

The .NET Framework provides several components besides the standard controls that are provided in the Toolbox window.

.NET components can be categorized into two types. The types are:

In-process components

Out-of-process components

Summary (Contd.)

top related