CSCI E-143 CertPrep: User Assistance
(Kalani, chapter 10)
Saturday, Jan. 8, 2005
This Saturday we cover Kalani's chapter 10,
"User Assistance and Accessibility".
This chapter is probably the most boring in the book,
which means we end on a real downer.
To create Help files, you are supposed to use an SDK.
But I find no such SDK either in my installed version of .NET
nor on the installation disks.
This means that any Help SDK you might use has to be downloaded from Microsoft.
In addition, a lot of this chapter is devoted to point-and-click for
Help 2.0. Which version of Help are you supposed to use?
Here is what Microsoft MSDN says on its Help Technologies Start Page:
"Currently there are two versions of Help available for use with Microsoft Windows:
HTML Help 1.4 and Microsoft Help 2.
The Microsoft Help team [no smart remarks, please]
has decided not to release Microsoft Help 2 as a general Help platform.
This is primarily in response to customer feedback that the most important thing
is providing a standard Help experience on everybody's
machine. . . .
"Microsoft Help 2 is intended exclusively for those who are shipping products that integrate with, or extend, Visual Studio.NET."
If you understand that, could you explain it to me?
What it boils down to, I'm afraid, is that I can't find
a clear answer as to where you should concentrate any effort you might want
to spend on this chapter in Kalani.
It looks as if you should just read the chapter as quickly as possible and
let it go at that.
I would like to confess that I don't see any obvious difference
in the appearance of Help files produced by these two Help systems.
(Pictures: Kalani, pp. 694 [for Help 1.4]
and 704 [for Help 2])
I think you will probably get only a single question (at most)
about any of this stuff.
(But see the note at "Accessibility", below.)
Word in the discussion groups seems to be that the exams still have
the odd question about it.
Files in the Help 1.4 system
A Help 1.4 (or 1.3) system contains several different file types.
The following is an expansion of Kalani's introductory list:
(Kalani, p. 682)
- An overall help project file, of type .hhp
- "Topic" files, which are simply straight HTML files,
of type .htm.
These files may of course contain hyperlinks among themselves.
- Multimedia files, of various types
- Contents files, of type .hhc
- Index files, of type .hhk
- All of these are compiled into a file of type .chm
So far, we have not mentioned any way of tying an individual screen
in a Windows project to a particular Help file or screen.
Files in the Help 2 system
This ships as part of the "Visual Studio Help Integration Kit"
(VSHIK). (You may very well not have this as part of your
.NET installation; I didn't.)
In addition to the files listed above for Help 1.4, Help 2 includes
- Collections files, of type .hxc
- Keyword index files,
of type .hxf
(Kalani, p. 703)
The HelpProvider component
This is a .NET class which provides a link between an application
and a Help file.
(It may not seem credible, but Kalani says, in the box on page 706,
that Help 2 has no facility for creating such links.
Well, maybe it does by now.)
The HelpProvider component has a useful property:
- HelpNamespace. Set to the identity
of the compiled Help filesthat is, to the
.chm file.
It can, in fact, be any .htm file.
Suppose you set the HelpNamespace
property of your Form's HelpProvider
object to, oh, say, something like
http://www.csharpharvard.net/CSharpHarvard/CertPrep/KCh10UserAssistance.htm
what do you think would happen if you pressed F1 with the focus
on that Form? Yes it would, even if the Form's
ShowHelp on helpProvider1 property is set to
false.
What this means, of course, is that you can set this property
to point to your own web page and change its Help information as often
as needed to keep a user up-to-date.
All the user would have to do to get a browser opened to that web page
would be to press F1. It doesn't require a web application
to do this.
Remember that this HelpNamespace
is a property of your HelpProvider
object. It is not a property of the form itself.
In addition, the presence of a HelpProvider object
on a Windows Form causes the Form itself and all its components
with a visual aspect to have the following properties
(assuming that the HelpProvider object
on the Form is named helpProvider1:
(Kalani, p. 706)
- HelpKeyword on helpProvider1.
Typically set to a specific .htm page
within the compiled (.chm)
Help system.
- HelpNavigator on helpProvider1.
Usually set to "Topic".
(It's an enumeration.
Values: AssociateIndex, Find, Index,
KeywordIndex, TableOfContents, Topic.)
- ShowHelp on helpProvider1.
A boolean. Set it to true
if you want Help to show, as you do.
- HelpString on helpProvider1.
The text for the pop-up or "What's this?" help supplied by the
HelpProvider.
(Kalani, p. 708)
This last entry needs some additional information.
What's the difference between this "Pop-up" help and a
ToolTip, which will be discussed below?
The difference is in the way the user gets the text string to show.
A ToolTip appears if the mouse hovers over the described Control.
"Pop-up" help only appears if the user clicks on the Help button and then on the
Control. The Help button is a small button in the upper right of the
window, which contains a question mark.
(It is just to the left of the "X" which closes the app.)
To get this button to show, you must do all of the following:
- Set the Form's HelpButton property to
true,
- set the Form's MinimizeBox
property to false, and
- set the Form's MaximizeBox
property to false.
This all assumes, of course, that you have
- put a helpful text string in the Control's
HelpString on helpProvider1 property, and
- set the Control's ShowHelp on helpProvider1
property to true.
These requirements make it look as if the only place you would really consider
using this "Pop-up" help is on some small screen like a dialog box,
where you don't want the minimize and maximize buttons anyway.
The Help class
This is a static class with two members:
(Kalani, p. 708, top)
- Help.ShowHelp(). Displays the contents
of a specified Help file.
Typically used in menu items.
- Help.ShowHelpIndex(). Shows the index
of a specified Help file.
The ToolTip component
(We have seen this before.)
ToolTips are text strings that appear in their own boxes when the mouse
hovers over a Control which has such a ToolTip defined.
To use one, drag a ToolTip
component from the ToolBox onto the Form.
This gives a ToolTip
property for each visual component
on the Form which you can use to give helpful text.
There are some associated properties:
(Kalani, p. 710)
- InitialDelay. The time,
in milliseconds, before the initial ToolTip text shows.
- AutoPopDelay.
How long the ToolTip remains displayed.
- ReshowDelay. The delay before
subsequent ToolTips are displayed.
- AutomaticDelay.
This value may be used to set the other values, such as
InitialDelay.
The Accessibility class
"Accessibility" here means making computer systems usable by people with various
disabilities. There is a lot of general interest in this area,
and you are almost certain to see one question in this area.
There are some general guidelines here, such as
- Don't depend on color or sound alone
as the sole means of informing a user
- Make an application usable via the keyboard, not just via the mouse
- For Controls on your Form, provide labels and descriptions which might be
read by a "screen reader"
In addition, there are properties specifically for Accessibility,
including
(Kalani, p. 713)
- AccessibleDescription.
"An object's AccessibleDescription property provides a textual description
about an object's visual appearance. The description is primarily
used to provide greater context for low-vision or blind users,
but can also be used for context searching or other applications."
(Help: "Control.AccessibleDescription Property")
- AccessibleName.
"The AccessibleName property is a label that briefly describes and identifies
the object within its container, such as the text in a Button,
the name of a MenuItem, or a label displayed next to a TextBox
control."
(Help: "Control.AccessibleName Property")
- AccessibleRole.
"The AccessibleRole property describes what kind of user interface element
an object is."
(Don't ask; I don't understand that, either.)
(Help: "Control.AccessibleRole Property")
This property is set to a member of the surprisingly long
AccessibleRole enumeration,
whose values include
Alert, animation, Application, Border, Caret,
Chart, Clock, Cursor, Diagram, Document, DropList, Graphic,
etc., etc., etc., all the way to Window.
(Help: "AccessibleRole Enumeration")
It's apparently not to be used by beginners.
Kalani doesn't describe it, and it doesn't appear as the right answer
in any of the sample test questionsthough it appears in other answers.
High-Contrast Mode
High-Contrast mode is indicated by a value of
true in the system variable SystemInformation.HighContrast.
A change in its setting is indicated by the
SystemEvents.UserPreferenceChanged event.
If the boolean switch is on, you should
(Kalani, p. 716)
- Use only system colors;
- Add visual cues;
- Remove background images or patterns.
Here are the relevant questions from the two tests at the end
of the "short Kalani" book:
Test 1: question
40 (page 375; answer: page 396).
Test 2: questions
10 (page 408; answer: page 440), 35.
(Some of these questions may duplicate those in long Kalani.
Both texts are listed here.)
Last revised Jan. 8, 2005