Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to save window layout

Status
Not open for further replies.

beeleegie

Programmer
May 15, 2002
42
HK
i am developing a mdi application. I want to have a function to allow user save their mdi child windows layout in the preference, and it will load back the layout when start up the program next time. I am using xml to save the location.x, y, width, height and windowstated of every mdi child window and mdi container. But when the mdi child windows state in maximized form, it will not load out properly in maximize form. And also it doesn't work properly when i call the load layout function in the constructor of mdi container. (the location.x and y of mdi child window is start at 0,0 rather than the saved one). Does anyone know any good function can handle the save window layout?
 
I know what's wrong now. I should set the form.visible to true before setting x,y,width, height. And If the mdi child window's windowstate is maximize, it should visible to true at last so that other mdi child window won't affect it. Because if other windows' windowstate are normal, they will make the maximize window become normal state too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top