design for form member serialization

bwells

Regular
Joined
Feb 25, 2003
Messages
84
I have a general question I am hopeing someone can offer some insight for.

I have several MDI child forms. When the user saves their current project, I want to save the forms position, size and H/V scroll positioon.

Also if the user closes a form, and then re-opens the form, I want it to come back at the same size and position as before.

When the user opens a project, I want to restore the child forms just like they were when the user saved the project.

I have tried a lot of things but I get into sticky issues listening to the form resize/move events to remember the last values. And on restore, it also gets messy because when I set the size or location from serialization, I end up generating size and location change events that I am listening to, etc.

Can someone suggest a good design to support what I am describing?

It sure would be nice if serialization worked on Forms so I wouldnt have to write all this code! It seems like it should be easier than it is turning out to be.

thanks
Bryan
 
Back
Top