Solved

Getting ActiveX Vsspell to execute

Posted on 1998-08-02
12
323 Views
Last Modified: 2010-04-04
I have a built a mini text editor and wish to incorporate the spell checker. I am using Delphi 3, Windows 95. Coding sequence is unkown. Sample is being sought. Sam's text supplied with Delphi 3 has  none  and neither have I discovered any on the internet.

Thanks, Delphi3
0
Comment
Question by:delphi3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
12 Comments
 
LVL 4

Accepted Solution

by:
BoRiS earned 60 total points
ID: 1359549
delphi3

the helpfile is in the

but just use this..

procedure TForm1.Button1Click(Sender: TObject);
begin
 VSpell1.CheckText = Edit1.Text;
end.

if you need more help just leave a comment...

Later
BoRiS
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1359550
delphi3

sorry the help file is in ...Borland\Delphi3\Ocx\Vci\Vspell\Vsocx.hlp

Later
BoRiS
0
 
LVL 4

Author Comment

by:delphi3
ID: 1359551
Good job BoRiS,

I didn't know that  Ocx\Vci\Vspell\Vsocx.hlp   was available. In my situation, for your sample provided, I needed to rewrite the code  to the procedure.

procedure TForm1.Button3Click(Sender: TObject);
begin
     VSspell1.CheckText := Memo1.Text;
end;

It works fine to launch the spell checker, it discovers the error in a line of text, makes suggestions,  but makes no change in the text when pressing the Replace button on the spell check form supplied. One more thing to discover why it does not work beyond this.

 I sincerely thank you,

Delphi3
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
LVL 4

Expert Comment

by:BoRiS
ID: 1359552
delphi3

have you tried the ReplacementWord property...

VSpell1.ReplacementWord = TextBox.Text
VSpell1.ReplaceLastWord = True

Later
BoRiS
0
 
LVL 4

Author Comment

by:delphi3
ID: 1359553
BoRiS,

I tried, as referenced in theOcx\Vci\Vspell\Vsocx.hlp,  and  before you I read your solution, with modifications :

procedure TForm1.Button3Click(Sender: TObject);
begin
     VSspell1.CheckText := Memo1.Text;
     If VSspell1.ReplaceOccurred Then
          Memo1.text := VSspell1.Text
end;

 This above works fine but I will try yours too (after I Change VSpell1 to VSspell1, of course, so that my version of Delphi 3 can read it).

And A BIG THANKS,
Delphi3
0
 
LVL 4

Author Comment

by:delphi3
ID: 1359554
Adjusted points to 60
0
 
LVL 4

Author Comment

by:delphi3
ID: 1359555
BoRiS,

Seems like there is always just one more thing. The VsSpell checker does its job. Is there a means to have the word it is looking at, that is, the  mispelled word  be highlighted in the text? I have looked in the help referenced earlier and see the highlighting is  not in one of the options or just maybe I am not calling it by the correct name.


0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1359556
delphi3

when you say the mispelled word do you mean in the memo or in the vspeller textbox...

Later
BoRiS
0
 
LVL 4

Author Comment

by:delphi3
ID: 1359557
BoRiS,

Thanks for the reply.

 When the VsSpell finds WordOneMisSpelled in the Memo1Box,  that my code interrupt VsSpell after having made the discovery,  and instruct it to higlight WordOneMisSpelled in  the Memo1TextBox, prior to my accepting or rejecting the VsSpell choice of words for the change. I  then press the Replace button on VsSpell, the code returns the text color of WordOneChanged  to a color state of  all Memo1Text. Then on to the next word, highlight WordTwoMisSpelled in the Memo1TextBox, and so on.

I did try using  other code as I could find in the examples provided but it only listed the line and the character number of the very last event that VsSpell found in error. That was of no use as as I may have had  more that one mistake and it is really not what I am searching for anyway.

Thanks,

Delphi3


0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1359558
delphi3

I'll check it out for you and let you know...

Later
BoRiS
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1359559
delphi3

I'll check it out for you and let you know...

Later
BoRiS
0
 
LVL 4

Author Comment

by:delphi3
ID: 1359560
BoRiS,
I have worked out the solution.  I could share it with you. The main structure to implement a highligted error and the immediate replacement of that error in the original text with the changed word   has to do with the VsSpell1 event: onMisspelled, to include a call to SetFocus and  a  call for an update while VsSpell is locating the next error. The other  change is  to  set an item in the object inspector, referencing Memo1:HideSelection from true to false.

Delphi3

Hope that makes sense:
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses
Course of the Month8 days, 15 hours left to enroll

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question