Re: Where to call RestoreDesktop?



"Tom de Neef" <tdeneef@xxxxxxxx> wrote in message
news:438c1d24$0$11061$e4fe514c@xxxxxxxxxxxxxxxxx

> I want to save the state of the application's desktop to the registry
> on exit and reload on startup.
> In mainForm.Onclose I cycle through the application's forms and store
> size, location and visibility.
>
> But where should I put the reverse procedure?
> It must be executed at a time when all forms are created, just before
> they are displayed.
> That could be in each form's loaded method, but isn't there an event
> that signals that the application is ready to go 'live'.

Loaded is the right place. Overriding a method is just as good as
writing an event handler. Don't forget to call inherited.

Groetjes,
Maarten Wiltink


.



Relevant Pages

  • Re: Where to call RestoreDesktop?
    ... >exit and reload on startup. ... >In mainForm.Onclose I cycle through the application's forms and store size, ... Personally I think I would use the Loaded method in each Form ...
    (comp.lang.pascal.delphi.misc)
  • RE: Cancelling Form.Load event
    ... within the load event handler. ... A better solution to your question is to load data from the database before ... If you choose a form as the startup object and enable the application ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Class Modules?
    ... One way is to open a dummy form with the hidden option as part of your ... startup. ... Put your code on the *OnClose* event handler. ...
    (microsoft.public.access.modulesdaovba)
  • Re: creating custom tool bar for office application
    ... Could you give a reference for how to set up an event handler (in VS.Net ... 2005 COM add-in) for when a document opens? ... interface isn't called when a document is opened, but only at startup. ...
    (microsoft.public.office.developer.com.add_ins)