ComponentOne Spell 8.0 for ActiveX
Step 1: Create the Main Form

Start a new Visual Basic project, add the VSSpell control to the Visual Basic Toolbox, and add controls to create the main form. The form is divided in three sections, each consisting of a frame control with its own VSSpell control and other subordinate controls. Here is how the form should look:

The top panel will demonstrate As-you-type Spell Checking (Data Entry). It has the following controls:

Note: Set the name for each text box in the top panel to Text1 in the properties box. When you create the second text box, a message displays asking if you want to create an array. Click Yes. The names then change to Text1(0), Text1(1).


Name

Type

Function

VSSpell1

VSSpell

Provides spell checking for this panel.

Text1(0)

TextEdit

This is where the user will type the text to be spell checked.

Text1(1)

TextEdit

This is where the user will type text to be spell checked.

Text1(2)

TextEdit

This is where the user will type text to be spell checked.

Check1

CheckBox

Toggles auto-correct mode on and off.

Shape1

Shape

Used to show a red signal when the user makes a typing error.

The middle panel will demonstrate Long Document Spell Checking. It has the following controls:

Name

Type

Function

VSSpell2

VSSpell

Provides spell checking for this panel.

Text2

TextEdit

This is where the user will type the text to be spell checked. This could also be a RichTextEdit control. To be able to see misspelled words better, set the HideSelection property to False. Set the Multiline property to True so the user can enter more than one line of text.

Command1

CommandButton

Starts spell checking the text in Text2.

The bottom panel will demonstrate Spell Checking Plain Text. It has the following controls:

Name

Type

Function

VSSpell3

VSSpell

Provides spell checking for this panel.

Text3

TextEdit

Used for changing ListBox entries.

List1

ListBox

Contains strings that will be spell checked. Set the Style property to 1 so the list will display checkboxes next to each item.

Command2

CommandButton

Spell check every ListBox item.

Create a single menu called mPopup with an array of six sub-items using the Visual Basic Menu Editor in the Tools menu. Make mPopup invisible; we'll display it using code.

Next create the sub-items for mPopup. Click the Next button. Enter mSuggest in the Name box for each sub-item. Set the Index value according to the order of the sub-items (for example, Accept Word = 0, A=1, and so on). All sub-items within the mPopup menu should be set to visible.

Here's how the menu should look in the Menu Editor window:

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback