Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / January 2008

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve McKewen - 18 Jan 2008 02:10 GMT
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
David Lowndes - 20 Jan 2008 14:45 GMT
>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
Steve McKewen - 20 Jan 2008 23:23 GMT
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
David Lowndes - 21 Jan 2008 12:19 GMT
>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
Steve McKewen - 22 Jan 2008 00:33 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.