9
99pshop via .NET 247
Hi
Am new to VB.NET and wondering how to centre my form in the mdi that is maximised or set to a diferent size.
I tried this
wTop = (frmMDI.Size.Height - frm.Size.Height) \ 2
wLeft = (frmMDI.Size.Width - frm.Size.Width) \ 2
frm.Location = New Point(wLeft, wTop)
Main problem is when the mdi form is maximised, the size reported is not the new size but the size set at design time.
Am new to VB.NET and wondering how to centre my form in the mdi that is maximised or set to a diferent size.
I tried this
wTop = (frmMDI.Size.Height - frm.Size.Height) \ 2
wLeft = (frmMDI.Size.Width - frm.Size.Width) \ 2
frm.Location = New Point(wLeft, wTop)
Main problem is when the mdi form is maximised, the size reported is not the new size but the size set at design time.