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]

or
....
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.57 MB
Time: 0.031 c
6-22285
Vital
2001-10-09 12:34
2002.01.08
The problem of choice


7-22444
VS
2001-09-27 07:14
2002.01.08
How to copy yourself if the program is running


6-22316
dmur
2001-09-24 20:58
2002.01.08
Interception of errors when connecting using sockets


1-22200
Sergei_B
2001-12-15 09:57
2002.01.08
Intxnumx and file size


1-22177
Cutting
2001-12-21 09:38
2002.01.08
Why do not work bryaki in





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