|
-
June 14th, 2005, 01:28 PM
#1
When's a Good Time to record Size Info in a Form
Greetings:
This question is related to a question that I posted a few minutes ago but I am trying to adhere to the one-question-per-post policy.
I am trying to save program settings in an XML file, like directories and the position and size of the main program form. This is working fairly well. However, I am currently using the Resize event as the event where I should update the XML file with the new form size information. Its working OK but it bothers me a bit that this event is called repeatedly as the form is being resized. This means that the XML is being opened, updated and closed 100's of times in a few seconds while the form is being resized.
Is there not an event notification that I can use to tell when the mouse has been dropped and the resize/drag operation is complete and use this as the time to update the form coordinates?
I have read the documentation for the other event SizeChanged and I have even tried it but I cannot see what the difference is between these two events.
Any thoughts?
Thank you in advance,
Mark
-
June 14th, 2005, 05:05 PM
#2
Re: When's a Good Time to record Size Info in a Form
Why would you want to save the current size to a file at any other time than program exit?
-
June 14th, 2005, 06:12 PM
#3
Re: When's a Good Time to record Size Info in a Form
Hi. Dispose(bool) is the place you should record your settings, as it is the method called to distroy your form object.
Bye
-
June 14th, 2005, 11:39 PM
#4
Re: When's a Good Time to record Size Info in a Form
Y dont u try it in the Form_Close event...???
Regards,
Mmx
-
June 15th, 2005, 07:52 AM
#5
Re: When's a Good Time to record Size Info in a Form
Thanks, everybody. Its seems to be unanimous that the settings should be recorded when the form is being closed.
Cheers,
Mark
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|