MDI creep form (position change in the MDI window)

I have a VB.NET MDI WinForms application. My users complain about the creep form (as they call it), every time you open a specific form in the main MDI window, it opens just below and to the right of the previously loaded location, that is, it starts in the upper left of the window and makes its way down to the right.

I have to agree with them that this is extremely annoying, is there a way to prevent this? Code to download forms:

frmPurchaseInvoiceSelect.Show()
frmPurchaseInvoiceSelect.MdiParent = Me

I can solve this problem by setting the initial positions of the forms in the "Guide", but then they simply open directly one above the other in the upper left corner of the screen.

Any other SO users coming across this?

+3
source share
5 answers

Try

frmPurchaseInvoiceSelect.StartPosition = FromStartPosition.CenterParent

to always start at the center of the Mdi parent.

There are several options, but it depends on where you want the form to start. I have not tried, but:

frmPurchaseInvoiceSelect.Location = windowPoint
frmPurchaseInvoiceSelect.Size = windowSize
frmPurchaseInvoiceSelect.StartPosition = FormStartPosition.Manual  

should start the form exactly where you want.

+3
source

See my question and the received answer, which can help you in solving this problem. You can also see my very verbose blog entry . My code is written in Delphi, but you have to port these concepts to VB.

+1
source

frmUser.StartPosition = FormStartPosition.Manual ""

+1

, . MDI, 0,0 MDI, . , 0,0, - , , ( ..). , , . - , , , , . , 0,0, .

MDI, , , , . , .

0

MBoy,

MDI , SDI. MDI ( ), , . . , MDI. . . , ( ), (, ). , MDI /, . , , MDI, , .

0
source

All Articles