Announcement

Collapse
No announcement yet.

MDI aus DLL in D5 - Problem Tab-Tasten

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • MDI aus DLL in D5 - Problem Tab-Tasten

    Ich rufe wie unten beschrieben ein MDI Fenster aus einer DLL auf.
    Leider habe ich das Problem unter Delphi 5 funktioniert die Tabulatortaste und Alt-Hotkeys der MDI-Fenster nicht mehr. Die Hauptfenster funktionieren voll normal, Modale Fenster auch. hat jemand das problem schon in dieser form gekannt oder kann mir sagen, wie ich dem aus dem Weg gehen kann???

    TYPE
    T_ProvaChild = procedure (ParentApplication: TApplication; ParentForm: TForm); stdcall;

    procedure TMainForm.StartClick(Sender: TObject);
    var
    DllHandle: THandle;
    ProcAddr: FarProc;
    ProvaChild: T_ProvaChild;
    begin
    DllHandle := LoadLibrary('ProjectDll');
    ProcAddr := GetProcAddress(DllHandle, 'ProvaChild');
    if ProcAddr <> nil then
    begin
    ProvaChild := ProcAddr;
    ProvaChild(Application,Self);
    end;
    end;

    DLL-Code:

    VAR
    DllApplication : TApplication;

    procedure ProvaChild(ParentApplication: TApplication; ParentForm: TForm); export; stdcall;
    var
    Form1: TForm1;
    begin
    IF DllApplication = NIL THEN DllApplication := Application;

    Application:=ParentApplication;

    Form1:=TForm1.Create(ParentForm);
    Form1.Name := '';
    Form1.MyParentForm:=ParentForm;
    Form1.MyParentApplication:=ParentApplication;
    Form1.Show;
    end;

    procedure DLLUnloadProc(Reason: Integer); register;
    begin
    if Reason = DLL_PROCESS_DETACH then Application:=DllApplication;
    end;

    exports
    ProvaChild;

    begin
    DllApplication:=Application;
    DLLProc := @DLLUnloadProc;
    end.

  • #2
    Hallo Anthony!

    Ich habe das selbe Phänomen/Problem! Unter D4 lief alles problemlos (auch die Tab-Taste) Seit wir das ganze unter D5 kompiliert haben funktioniert die Tab-Taste allerdings nicht mehr! Auch ich habe bisher noch keine Lösung gefunden

    Comment

    Working...
    X