By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,219 Members | 2,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,219 IT Pros & Developers. It's quick & easy.

Setting MDI Child Form location programatically

P: n/a
Tom
I want to be able to 'make' a MDI Child Window appear at the same place in
my MDI container. For example, maybe I want this Child window to always
appear at Top=0 and Left=0; or, when the user exits my Child window, I save
the last location for that window, and then when the reopen the window I
want to restore the location they were at previously.

In my Load event, I set the .Top and .Left properties for my child window;
however, when it shows in my MDI container it is always positioned
automatically (cascaded) and NOT positioned at the place I told it too. How
can I make it appear at the location I want it to within the MDI container?

Thanks.

Tom
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
when you open your child....
Dim f As New Form1

f.StartPosition = FormStartPosition.Manual 'here's the key

f.Left = 0

f.Top = 0

f.MdiParent = Me

f.Show()

"Tom" <to*@nospam.com> wrote in message
news:OY**************@TK2MSFTNGP10.phx.gbl...
I want to be able to 'make' a MDI Child Window appear at the same place in
my MDI container. For example, maybe I want this Child window to always
appear at Top=0 and Left=0; or, when the user exits my Child window, I save the last location for that window, and then when the reopen the window I
want to restore the location they were at previously.

In my Load event, I set the .Top and .Left properties for my child window;
however, when it shows in my MDI container it is always positioned
automatically (cascaded) and NOT positioned at the place I told it too. How can I make it appear at the location I want it to within the MDI container?
Thanks.

Tom

Nov 20 '05 #2

P: n/a
when you open your child....
Dim f As New Form1

f.StartPosition = FormStartPosition.Manual 'here's the key

f.Left = 0

f.Top = 0

f.MdiParent = Me

f.Show()

"Tom" <to*@nospam.com> wrote in message
news:OY**************@TK2MSFTNGP10.phx.gbl...
I want to be able to 'make' a MDI Child Window appear at the same place in
my MDI container. For example, maybe I want this Child window to always
appear at Top=0 and Left=0; or, when the user exits my Child window, I save the last location for that window, and then when the reopen the window I
want to restore the location they were at previously.

In my Load event, I set the .Top and .Left properties for my child window;
however, when it shows in my MDI container it is always positioned
automatically (cascaded) and NOT positioned at the place I told it too. How can I make it appear at the location I want it to within the MDI container?
Thanks.

Tom

Nov 20 '05 #3

P: n/a
Tom
Ah, .Manual was the key. That fixed it. Thanks!

Tom

"SStory" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
news:eY**************@TK2MSFTNGP09.phx.gbl...
when you open your child....
Dim f As New Form1

f.StartPosition = FormStartPosition.Manual 'here's the key

f.Left = 0

f.Top = 0

f.MdiParent = Me

f.Show()

"Tom" <to*@nospam.com> wrote in message
news:OY**************@TK2MSFTNGP10.phx.gbl...
I want to be able to 'make' a MDI Child Window appear at the same place in my MDI container. For example, maybe I want this Child window to always
appear at Top=0 and Left=0; or, when the user exits my Child window, I

save
the last location for that window, and then when the reopen the window I
want to restore the location they were at previously.

In my Load event, I set the .Top and .Left properties for my child window; however, when it shows in my MDI container it is always positioned
automatically (cascaded) and NOT positioned at the place I told it too.

How
can I make it appear at the location I want it to within the MDI

container?

Thanks.

Tom


Nov 20 '05 #4

P: n/a
you're welcome
"Tom" <to*@nospam.com> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...
Ah, .Manual was the key. That fixed it. Thanks!

Tom

"SStory" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
news:eY**************@TK2MSFTNGP09.phx.gbl...
when you open your child....
Dim f As New Form1

f.StartPosition = FormStartPosition.Manual 'here's the key

f.Left = 0

f.Top = 0

f.MdiParent = Me

f.Show()

"Tom" <to*@nospam.com> wrote in message
news:OY**************@TK2MSFTNGP10.phx.gbl...
I want to be able to 'make' a MDI Child Window appear at the same place
in
my MDI container. For example, maybe I want this Child window to
always appear at Top=0 and Left=0; or, when the user exits my Child window, I

save
the last location for that window, and then when the reopen the window I want to restore the location they were at previously.

In my Load event, I set the .Top and .Left properties for my child window; however, when it shows in my MDI container it is always positioned
automatically (cascaded) and NOT positioned at the place I told it

too. How
can I make it appear at the location I want it to within the MDI

container?

Thanks.

Tom



Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.