Home
Forum: "Main";
Current archive: 2002.02.07;

Down

#### How to call the procedure after the full display of the main form? Find similar branches

Smok_er   (2002-01-22 04:49) [0]

This is the question for you: how to call a certain procedure after the complete creation and display of the main form? The OnCreate and OnShow methods are not suitable, because this procedure is first performed (which is quite a long time), and only then the form is displayed.

Digitman   (2002-01-22 08:18) [1]

In the OnShow () handler, they sent themselves to themselves some predefined message by calling PostMessage (). In the message handler, call your "certain procedure"

Johnny Smith   (2002-01-22 09:42) [2]

You can do this: before starting your procedure, write Form1.Repaint;

aus   (2002-01-22 12:28) [3]

OnActivate

dimsfdf   (2002-01-22 13:48) [4]

Application.OnIdle

Smok_er   (2002-01-23 03:01) [5]

Thank you all who responded!
With the OnActivate method, everything turns out great!

SoftOne   (2002-01-23 03:11) [6]

2 Smok_er.
IMHO, according to OnActivate, you can earn hemorrhoids, since it can be called up a number of times during the operation of the application. So is OnIdle.
If you need a one-time call of a function when you start the application, but after displaying the form, then IMHO Digiman gave the best advice.

SoftOne   (2002-01-23 04:01) [7]

Sorry. I wrote the previous answer while thinking about my problems. However, upon serious consideration, I realized that I was not quite right. In essence, OnActivate is probably the best solution, but with a mandatory consideration singleness fulfillment. Digitman's advice, due to the ideology of Windows, may not be suitable (again, I recall my problems) since some time may elapse between completing OnShow and executing PostMessage.

Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.02.07;