How "should" I remember and reuse form size and location?

  • Thread starter Thread starter Steve McKewen
  • Start date Start date
S

Steve McKewen

I have a VC 2005 application that I want to remember some dialog locations
and sizes between executions.
What is the recommended process for this?

Steve
 
I have a VC 2005 application that I want to remember some dialog locations
and sizes between executions.
What is the recommended process for this?

Steve,

I'd try handling the WM_WINDOWPOSCHANGED message, save the settings
you want and restore them (using SetWindowPos) in response to the
WM_INITDIALOG message on startup.

Dave
 
Thanks Dave.
I know how to get and set the position and size, but what is the
recommended/easiest method to store and retrieve the values.
Previously I have used registry entries, but what should I use in dotnet
2.0?

Steve
 
I know how to get and set the position and size, but what is the
recommended/easiest method to store and retrieve the values.
Previously I have used registry entries, but what should I use in dotnet
2.0?

I don't know what's best for your application Steve, it depends on
your requirements as to whether you should continue to use the
registry or store the settings in a configuration file. If it's a
per-user setting, I'd probably stick with the registry myself.

Dave
 
I already have a configuration file for application settings, but I want to
keep per user stuff for screen layouts.
I will use the regsitry.

Thanks Dave
 
Back
Top