Delphi - form in DLL - hints not showing

I have a Delphi form inside a DLL (I know this limits the use of DLLs for Delphi, but in this case it is not a problem).

The DLL exports a function ShowFormthat looks something like this:

procedure ShowForm (App : TApplication);
begin
  OldApp := Application;
  try
    Application := App;
    MyForm := TMyForm.Create (nil);
    try
      MyForm.ShowModal;
    finally
      FreeAndNil (MyForm);
    end;
  finally
    Application := OldApp;
  end;
end;

Now in the form I use TAdvOfficeHint(from the TMS component package). Sorry, no prompts are displayed.

Am I missing something? How can I make the form behave as if I showed it from the main application?

Thank!

+3
source share
4 answers

TAdvOfficeHint, , Application.OnShowHint, THintWindowClass, DLL TMS, , .

Application : , Screen, Mouse .. , , , - .

+5

.

, :

procedure ShowForm (AppHandle : THandle);
begin
  OldAppHandle := Application.Handle;
  try
    Application.Handle := AppHandle;
    ........
  finally
    Application.Handle := OldAppHandle;
  end;
end;
+1

, . TOndrej, TAdvOfficeHint Application.OnShowHint :

FHintInfo.Assign (AHintInfo);

Assign

if (Source is TAddvHintInfo) then ...

- DLL .

, , , .

, -, , , .

0

, Delphi 2006 System.ShareMemoryManager EXE-, , .

0
source

Source: https://habr.com/ru/post/1733173/


All Articles