VSSpell Quick Start > AutoLinkHwnd |
The AutoLinkHwnd property is used to link the VSSpell control to an external control, typically a regular text editor or a rich textbox (TextEdit or RichTextEdit controls). Set the AutoLinkHwnd property to the hWnd property of the control you want to spell check. The following code links the VSSpell control to the textbox and starts the spell checking when the Check Spelling button is pressed.
Example Title |
Copy Code
|
---|---|
Private Sub Command1_Click() ' Link spell check to the window. VSSpell1.AutoLinkHwnd = Text1.hWnd ' You can start checking anywhere in the text. VSSpell1.SelStart = 0 ' Start automatic spelling process. VSSpell1.Start = True End Sub |
Note that you don't need to assign anything to the VSSpell's Text property. When VSSpell starts the spell-checking process, it will retrieve the text automatically from the Text1 control.