Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

Dialog & dll Find similar branches


DNT   (2001-12-15 16:20) [0]

Guys, how to cram the AboutBox dialog into a dll and then call it from the program?



MARcoDEN   (2001-12-15 17:27) [1]

Instructions + example:

1. File -> New -> DLL
2. File -> New Form

To call a form from another application, you need to create it dynamically, since The usual Delphi mechanisms do not work in DLL libraries. Therefore, it is necessary to describe a new procedure:
procedures ShowMyForm (AOwner: TComponent);
was MyForm: TForm2;
begin
MyForm: = TForm2.Create (AOwner);
MyForm: = ShowModal;
MyForm.Free;
end;

Let's include the created procedure in the export list:
exports ShowMyForm;

Now, switch to the Project2.exe project and specify the new imported procedure:
procedures ShowMyForm (AOwner: TComponent);
external "Project1.dll";

Then you can create a handler, for example:
procedures
begin
ShowMyForm (Self);
end;



DNT   (2001-12-15 17:43) [2]

Thank you!



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top









Memory: 0.55 MB
Time: 0.024 c
7-22445
Kirill
2001-09-21 19:03
2002.01.08
Record to dll


4-22494
Garryfv
2001-11-05 12:35
2002.01.08
Difficult graphic printing


3-21951
olban
2001-12-05 11:07
2002.01.08
Use QuantumGrid


1-22069
Xtorm
2001-12-19 10:40
2002.01.08
How?


3-21926
Oleon
2001-12-04 15:14
2002.01.08
Creating a table from Delphi.





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish