Board index » delphi » How to cancel form show?

How to cancel form show?

hi,

i have two forms, one of them calls the other one within its OnShow event.
if the user actions approved on the second form then it feeds back the first
one to go on showing or else it terminates the application; but in spite of
being in termination process, the first one still becomes visible and and
wipes out from the screen. i tried to prevent this behaviour but cant
aechieved, any comments?

Best Regards..

 

Re:How to cancel form show?


"Mustafa" <myu...@kombassan.com.tr> skrev i en meddelelse
news:3a128fef_2@dnews...

Quote
> i have two forms, one of them calls the other one within its OnShow event.
> if the user actions approved on the second form then it feeds back the
first
> one to go on showing or else it terminates the application; but in spite
of
> being in termination process, the first one still becomes visible and and
> wipes out from the screen. i tried to prevent this behaviour but cant
> aechieved, any comments?

You cannot cancel a form show.
But you can do this
  PostMessage(Self.Handle, WM_CLOSE, 0, 0);
in the FormShow event.

But it would be even better simply not to show the form in the first place.

Finn Tolderlund

Re:How to cancel form show?


you can use a timer, if u want to cancel the show, activate the timer (1
ms).

--
Salim Giacoman
GVG Sistemas
Torreon, Mexico

Mustafa <myu...@kombassan.com.tr> escribi en el mensaje de noticias
3a128fef_2@dnews...

Quote
> hi,

> i have two forms, one of them calls the other one within its OnShow event.
> if the user actions approved on the second form then it feeds back the
first
> one to go on showing or else it terminates the application; but in spite
of
> being in termination process, the first one still becomes visible and and
> wipes out from the screen. i tried to prevent this behaviour but cant
> aechieved, any comments?

> Best Regards..

Other Threads