Automatic Dialog Box
Leave the AutomaticDialog property set to its default value, EnglishDialog. This causes a dialog box to show synonyms when a word is selected and the Thesaurus command button is pressed. The built-in dialog box greatly reduces the code needed to handle thesaurus checking.
Synonyms are generated for a word that is found in the thesaurus. The Suggestion event is fired each time a new synonym is added to the Synonyms collection. The NotFound event is fired if the word is not found in the thesaurus. The Suggestion event is not fired in this case.
The Suggestion, NotFound, and Complete events may be fired whether or not the dialog box is used. However, if you are using the automatic dialog box, there is no need to respond to the events since the dialog box can handle the user's responses automatically.
You have completed all the necessary steps to incorporate thesaurus functionality. You can now run your program. Type some words in the textbox, select a word and then press the Thesaurus button. The Thesaurus dialog box will appear. If the word is not found in the thesaurus file, the NotFound event is fired. After the thesaurus check is complete, the Complete event is fired, whether the word is good or bad.
|