Wrestling with MDI problem

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!
 
S

Sergey Poberezovskiy

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
 
J

Julius

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top