Wrestling with MDI problem

  • Thread starter Thread starter Julius
  • Start date Start date
J

Julius

Hey all,

I've inherited a mess of a program that is too far along to be
rewritten. It uses MDI style forms. There is a main, parent form that
contains a menu. Other child forms display within this. Each successive
child form cascades down and to the right of the previous child form, ie.
normal windows behavior. However, if I close all child forms and then open
a new one. It does not open at the top-left of my parent form, but where
the previous child form left off.

Question is: how can I get this to reset? If a user closes all child
forms, I want them to start at the top-left of the parent. Thank you!
 
If you open child forms from within a generic routine,
you could check parent form's MDIChildren array, and then
reset newely opened child's Left and Top property to 0,
should that be the first child window.

Hope this helps.
-----Original Message-----
Hey all,

I've inherited a mess of a program that is too far along to be
rewritten. It uses MDI style forms. There is a main, parent form that
contains a menu. Other child forms display within this. Each successive
child form cascades down and to the right of the previous child form, ie.
normal windows behavior. However, if I close all child forms and then open
a new one. It does not open at the top-left of my parent form, but where
the previous child form left off.

Question is: how can I get this to reset? If a user closes all child
forms, I want them to start at the top-left of the parent. Thank you!




__________________________________________________________ _____________________
Posted Via Uncensored-News.Com - Accounts Starting At
$6.95 - http://www.uncensored-news.com
 
Sergey Poberezovskiy said:
If you open child forms from within a generic routine,
you could check parent form's MDIChildren array, and then
reset newely opened child's Left and Top property to 0,
should that be the first child window.

Hope this helps.


Thank you, I'll try it today!
 
Back
Top