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.58 MB
Time: 0.048 c
3-21947
Diehard
2001-12-05 13:18
2002.01.08
Retrieving an index list from an Oracle table


1-22144
shornik
2001-12-20 11:36
2002.01.08
Masters !!!! Please help with the problem!


7-22436
Serg2
2001-09-26 18:23
2002.01.08
Collapsing all windows


4-22485
delphixnumx
2001-11-05 06:56
2002.01.08
How can I load my cursor in the Delphi!


14-22398
Jey
2001-11-10 18:55
2002.01.08
Here here it is an IRC client to do ....





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