AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Forms in Dll aber jetzt Richtig

Ein Thema von Konse · begonnen am 6. Dez 2007 · letzter Beitrag vom 6. Dez 2007
 
Konse

Registriert seit: 20. Feb 2007
Ort: Bayern
27 Beiträge
 
Delphi 7 Professional
 
#1

Forms in Dll aber jetzt Richtig

  Alt 6. Dez 2007, 09:56
Hallo werte Delphianer,

ich habe schon viele Foren durchsucht, nach der möglichkeit Forms aus dlls zu nutzen.
Dort ergaben sich viele Möglichkeiten, je nach Anwendungskontext.
Mein Problem ist folgendes:
"Ich möchte eine Modale Form aus einer Dll heraus anzeigen lassen, die Parented von der Applikation ist."

Momentane gefundene möglichkeiten:
A
Delphi-Quellcode:
showForm(const myApp:TApplication; mySet:POwnSettingsRecord)
begin
  frmInDll := TFormDll.Create(myHandle, @mySet);
end;
B
Delphi-Quellcode:
showForm(const myApp:TApplication; const myScreen:TScreen; mySet:POwnSettingsRecord)
begin
  frmInDll := TFormDll.Create(myHandle, @mySet);
  screen:=myScreen; // ???? wie in der Dll
end;
C
Delphi-Quellcode:
showForm(mySet:POwnSettingsRecord)
begin
  frmInDll := TFormDll.Create(nil, @mySet);
end;
D
Delphi-Quellcode:
showForm(const myHndl:THandle; mySet:POwnSettingsRecord)
begin
  frmInDll := TFormDll.CreateParented(myHndl, @mySet);
end;
Ich würde jetzt gerne wissen welche lösung die richtige für mein Problem ist?
Ich persönlich hätte gesagt lösung D; diese funktioniert aber bei mir nicht wirklich.

Delphi-Quellcode:
constructor TFormDll.CreateParented(const myHandle: THandle;
  const mySettings: PTHMI_VALUES);
begin
  inherited CreateParented(myHandle);
  self.Parent:=TWinControl.CreateParentedControl( myHandle );

  initializeValues(mySettings);

end;


Hat irgendjemand eine Idee?
Warum ich Klingonische Programmierer so liebe:
- A true Klingon programmer does not comment his code
- You cannot truly appreciate Dilbert unless you´ve read in the original klingon
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:35 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz