Forum Discussion

oychw's avatar
oychw
Contributor
14 years ago

How can I judge a Form have finished load all controls?



I want to calculate the time of "open a Form".

The form include a lot of tables and images.

Have we some ways to  judge a Form have finished load all controls?

thanks!

4 Replies

  • Hi,



    As a 'general' solution, you can wait for the object which is loaded last (see the "Waiting for a Process or Window Activation" help topic).



    Also, if you know the number of controls which need to be loaded, you can check how many children your form has in a loop.
  • Jared:

       thanks! " the number of controls" sounds a good idea. I shall have a try.

       and Can TC catch windows' message?


  • Hi,



    There's no way to catch messages, however, if your application is Open, you can try handling events in it (see the "Creating Event Handlers for Events of Components in a Tested Application" help topic).