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.54 MB
Time: 0.022 c
7:22453
Juri
2001-09-21 18:26
2002.01.08
RS485


3:21977
Amelin Vadim
2001-12-03 20:42
2002.01.08
Creating a database in InterBase


6:22280
rg
2001-10-06 13:26
2002.01.08
How to accept a message from Winpopup (chat for lokalki)?


1:22172
ASTARD
2001-12-19 22:12
2002.01.08
People help pliz ???


7:22437
paradox
2001-09-25 18:48
2002.01.08
wav





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 Spanish 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