Solved

Delphi 5 Thesaurus component

Posted on 2001-07-16
7
155 Views
Last Modified: 2010-04-06
I need a free Thesaurus component  with source - no add-ons   I have tried ThesDB. DLL  but I can  not  work out how to access the DLL in delphi (5),  if I use MS-word component then  I can not work out how  import results back into my delphi program. - Need Delphi source code
0
Comment
Question by:MauriceToon
[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
7 Comments
 
LVL 44

Expert Comment

by:CrazyOne
ID: 6288423
Listening
0
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 100 total points
ID: 6288797
I just has a look at msth32.dll (Word 97)
ThesCheck
ThesCloseMdt
ThesInit
ThesOpenMdt
ThesTerminate
ThesVersion
are the only exported functions.
Do you have the C headers/documentation for these functions?
They seem all you need for accessing the Thesaurus files.
0
 

Author Comment

by:MauriceToon
ID: 6289085
not what I was looking for
0
Independent Software Vendors: 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!

 
LVL 2

Expert Comment

by:egono
ID: 6289116
you might use TWordApplication

[...]
var LangID        : OleVariant;
    Meaning       : OleVariant;
    mSysnonym     : SynonymInfo;
    i,j,k         : Integer;
    s             : string;
    mLine,mLine1  : Integer;

[...]
LangID:=wdGerman;
s:=Memo1.SelText;
if s='' then ShowMessage('Please mark word! ');
while s<>'' do
begin
  mSysnonym:=WordApplication1.SynonymInfo[s,LangId];
  if mSysnonym.Found then
  begin
    if not Assigned(ThesaurusForm) then
    begin
      ThesaurusForm:=TThesaurusForm.Create(nil);
    end;
    with ThesaurusForm do
    begin
      Edt_Word.Text:=s;
      SetLength(mSysLists,mSysnonym.MeaningCount+1);
      try
        for i:=1 to mSysnonym.MeaningCount do
        begin
          mSysLists[i-1]:=TStringList.Create;
          ListBox1.Items.Add(mSysnonym.MeaningList[i]);
          Meaning:=i;
          for j:=1 to MAXINT do
          begin
            try
              mSysLists[i-1].Add(mSysnonym.SynonymList[Meaning][j]);
              if Meaning=1 then ListBox2.Items.Add(mSysnonym.SynonymList[Meaning][j]);
            except Break; end;
          end;
        end;
        ListBox1.Items.Add('Ahnliche Begriffe');
        mSysLists[mSysnonym.MeaningCount]:=TStringList.Create;
        for i:=1 to MAXINT do
        begin
          try
            mSysLists[mSysnonym.MeaningCount].Add(mSysnonym.RelatedWordList[i]);
          except Break; end;
        end;
        k:=ShowModal;
        if (k=idOK) and (Edt_Replace.Text<>'') then
        begin
          Memo1.SelText:=Edt_Replace.Text;
          s:='';
        end else
        if (k=idRetry) then
        begin
          s:=ListBox2.Items[ListBox2.ItemIndex];
        end else
        if (k=idAbort) then  //back button
        begin
          s:=Memo1.SelText;
        end else
        begin
          s:='' ;
        end;
      finally
        ListBox1.Clear;
        ListBox2.Clear;
        for i:=0 to mSysnonym.MeaningCount do
        begin
          mSysLists[i].Free;
        end;
      end;
    end;
  end;
end;
[...]
0
 

Author Comment

by:MauriceToon
ID: 6296322
HI egono,
Outstanding code, but what is SynonymInfo  and ShowModal??
Maurice
mauricetoon@yahoo.co.nz
0
 

Author Comment

by:MauriceToon
ID: 6296899
HI egono,
Outstanding code, but what is wdGerman and showModal??
Maurice
mauricetoon@yahoo.co.nz
0
 

Author Comment

by:MauriceToon
ID: 6296905
I now know what SynonymInfo is but not idea about
wdGerman and showModal??
Thanks
Maurice
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

732 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