Re: Getting a Ttab*** to show on start-up



"Tom de Neef" <tdeneef@xxxxxxxx> wrote in message
news:43d7ef7c$0$11067$e4fe514c@xxxxxxxxxxxxxxxxx

> [...] The program starts with a Ttimer that fires after a short
> delay so that I can be (reasonably) sure that all the initialization
> sections have been executed and all the forms loaded.

Firing a timer happens through a Windows message, so it will never
happen before the project file reaches the Application.Run line.
So you can be really sure. You could also post a message to yourself,
that would be slightly cleaner.

All the same, I don't think I'd do this. For things that stay within
the form, overriding Loaded is the proper way. Things that may look
outside their own form need to wait until all forms have initialised;
I'd probably add a line to the project file. Or rearrange so forms
don't depend on other forms.


> [...] What happens is that the first tab gets the focus mark but the
> image of the pagecontrol is of the tab*** that was selected in the
> designer. When I click the first tab nothing changes (I guess because
> it already has the focus). When I click the 'designer' tab the image
> doesn't change (since it is already what it should be) and the
> corresponding tab now gets the focus mark. Only after clicking the
> first tab after clicking the other or a third tab will display the
> proper image of the first tab.

Very strange. Have you tried Invalidating some things, or HandleNeeded?

Groetjes,
Maarten Wiltink


.


Quantcast