Board index » delphi » How to auto popup forms ?

How to auto popup forms ?

I have a form which pops up in the OnActivate event which if button 1 is
pressed this simulates the load button being pressed which in turn loads a
new MDI child. Now that I've added this auto popup code I get a gpf because
it's being called from the OnActivate event. My only solution so far is to
set a one second timer inside the OnActivate so that the load button is
called by the timer routine, which works fine but is messy.

Is there any better ways that I can achieve this ?

Cheers,
Terry

 

Re:How to auto popup forms ?


I wasn't quite sure I understood the scenario -- could you explain in a bit
more detail what buttons are on what form, and what the desired behaviour
is in each situation? I'm sure we can then unravel the problem.

Phil Carr

Re:How to auto popup forms ?


Phil <p...@easynet.co.uk> wrote in article
<01bd3d53$2b19c150$0100a8c0@server>...

Quote
> I wasn't quite sure I understood the scenario -- could you explain in a
bit
> more detail what buttons are on what form, and what the desired behaviour
> is in each situation? I'm sure we can then unravel the problem.

Phil,

My main form, an MDI form, starts up with some shortcut button on the top
menu; new, load, save, etc. Selecting new creates a new MDI child form.

Instead of user intervention to click on load I want another form to popup
when the program has finished loading (to appear ontop of the MDI form) to
ask the user to select whether to load and print or do it the old way of
selecting new or load, making changes and then print.

At the moment this form is called in the OnActive method with a flag to
make sure it's only called the once. If the load is selected then
loadbtnclick(sender) is called as if the user clicked on the load button.
The MDI child is created and data loaded OK but at that point it gives a
GPF, which only seems because it's being called from the OnActivate method.
Must have something to do with the OnActivate being called again when the
MDI child is finished ?

Cheers,
Terry

Re:How to auto popup forms ?


On 20 Feb 1998 09:15:41 GMT, "Terry King" <terryk...@hot-shot.com>
wrote:

Quote
>My main form, an MDI form, starts up with some shortcut button on the top
>menu; new, load, save, etc. Selecting new creates a new MDI child form.

[snip]

Terry, I do not see anything technically wrong with the concept. So
there must be some problems with the implementation. Why not to post
the relevant portions of your code?

Pierre Gemis

Other Threads