Re: ShowForm ?



On Wed, 06 Jun 2007 19:15:58 -0500, Rob Kennedy <me3@xxxxxxxxxxx>
wrote:

I think he did. He said that what he has now is "not what I want becouse
the second form is shown before the main panel." That's happening
because of the OnShow event, which actually fires before the panel
(form) is visible. He says he wants an OnAfterShow event, which would
fire after the form is visible.

Yeah but all of that could be simply because he might be new to Delphi
and may not know the simplicity in how to hide/show forms on demand.

I still say that his original post wasn't clear enough in telling us
exactly what he wants and why it's not working. All I know for sure
is he wants certain conditions to be met. But without more details, I
doubt very much that he's going to get the help he needs.

What are the conditions, exactly?
Only once we know the answer will we be able to offer any usable
advice.


The problem isn't that the second form is always showing -- for which
the solution is, as you suggested, to hide it -- but rather that after
checking those "certain conditions" and telling the form to show itself,
it's appearing too soon.

But without knowing what his conditions are that must be met, we can't
help him. It could be as simple as hiding it at design time, or by
putting a timer on it...or in the worst-case scenario (in terms of
complexity level), he may need to use window messaging.

However, if it's something as simple as waiting for the user to press
certain buttons or enter certain text into an edit box -- then the
solution is as simple as "form2.visible := true" whenever his
conditions are met.

Never over-estimate the skill level of posters in this newsgroup. We
were all beginners once, and this might be such a case.
.



Relevant Pages

  • Re: ShowForm ?
    ... second form only after a form has been *seen*. ... That's happening because of the OnShow event, which actually fires before the panel is visible. ... To show the second form, he tried doing it in response to the first's OnShow event -- a natural choice, and a common mistake. ...
    (comp.lang.pascal.delphi.misc)
  • is there an event that fires when a child control is added to a parent container control (ie child p
    ... after a parent container control's constructor executes is there an ... event that fires as child controls are added to the parent ... I need to process child controls before the ... panel is painted. ...
    (microsoft.public.dotnet.framework.compactframework)