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

Down

How to interrupt the launch of the file? Find similar branches


Tupnyk   (2001-12-19 18:59) [0]

In the Project, m / s application.initializ ... and application.run, depending on a certain function and where to perform it if the forms are still being generated?



Юрий Зотов   (2001-12-19 19:21) [1]

How is it where? There and perform, where necessary - before Application.Run.

Click on the menu: Project | View Source. The text DPR opens and in it write the necessary code in the right place with pens. And to interrupt the launch, you can write Halt, or use if - for example, like this:

Application.Initialize;
if <condition check> then
begin
Application.CreateForm (...);
Application.CreateForm (...);
.
Application.Run
end
end.



Дремучий   (2001-12-19 19:28) [2]

eight
....
Application.Initialize; if <condition check> then Application.Terminate else Application.Run; end.



Юрий Зотов   (2001-12-19 19:36) [3]

> Dense © (19.12.01 19: 28)

Application.Run - starts the message retrieval cycle.
Application.Terminate - sends a WM_QUIT message.

Therefore, it is extremely interesting to know - how can Application.Terminate work if Application.Run was not called?



Tupnyk   (2001-12-19 21:07) [4]

And if part of the condition should be obtained as a result of the performance of a certain function, then where should this function itself be performed?



y-soft   (2001-12-19 21:26) [5]

> Tupnyk
You can follow the advice of Yuri Zotov, but
if possible, it is best to check before calling Application.Initialize, namely, in the Initialization section of the very first loadable module, and if necessary, interrupt the execution of the application there by simply calling Halt. Those. create a special module for this purpose and place it first in the USES .DPR file



Юрий Зотов   (2001-12-19 21:35) [6]

> Tupnyk (19.12.01 21: 07)

Probably, all the same not "run", and "settle down." The answer is anywhere, as long as it is “visible” from the DPR. That is, at least in the DPR itself, at least in any module registered in it.




Tupnyk   (2001-12-19 22:19) [7]

Thank you!



Дремучий   (2001-12-19 22:36) [8]

2 Yuri Zotov © (19.12.01 19: 36)
just the program will not end with Application.Terminate ;,
but by
end.

You are right, nevertheless this error code does not issue.

program Project1; uses Forms, Unit1 in "Unit1.pas" {Form1}; {$ R * .RES} begin Application.Initialize; Application.CreateForm (TForm1, Form1); Application.Terminate; //Application.Run; end.



Юрий Зотов   (2001-12-19 22:43) [9]

> Dense © (19.12.01 22: 36)

> This error code does not give ...

And why would he give an error? Of course, does not issue. But it does nothing: if Application.Terminate is just thrown out, then it will be exactly the same - completion by end. As shown in the example.





Pages: 1 whole branch

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

Top









Memory: 0.84 MB
Time: 0.132 c
1-22221
Sour
2001-12-16 21:00
2002.01.08
Resources


1-22068
Andrey21
2001-12-19 10:35
2002.01.08
Multilingual application


7-22418
Mikle
2001-09-20 09:06
2002.01.08
Urgently! Comp instead of the printer.


14-22376
Brand-new
2001-11-07 01:11
2002.01.08
help someone can


4-22483
Stropal
2001-11-03 10:57
2002.01.08
Fukntion parameters





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