B
bwadley
Hi,
Im fairly new to VB.NET and am hoping someone can help me with what is
probably a simple problem.
I have an MDI app, when I open a child form, I want it centered to the
parent. So I put some code in the FormLoad procedure which works out
the centre of the screen and moves the child appropraitely.
This is pretty much the code I have:
MdiParent = frmMain
Me.Top = ((frmMain.Height - Me.Height) / 2)
Me.Left = ((frmMain.Width - Me.Width) / 2)
Refresh_VehicleList()
The problem is that when this window opens, you can actually see the
form move. It seems that if i remove the call to refresh_vehiclelist
that the problem isnt as bad, but is still visible. This procedure
makes SQL server calls so tends to pause briefly as it opens the
connection. Its not a speed issue with the hardware as its a current
Core 2 Duo system.
My question is, is there anyway to hide the form before moving it (I
tried the Hide method but it didnt move) so that the user can not see
the form moving every time they open it?
Many thanks in advance!
Brad.
Im fairly new to VB.NET and am hoping someone can help me with what is
probably a simple problem.
I have an MDI app, when I open a child form, I want it centered to the
parent. So I put some code in the FormLoad procedure which works out
the centre of the screen and moves the child appropraitely.
This is pretty much the code I have:
MdiParent = frmMain
Me.Top = ((frmMain.Height - Me.Height) / 2)
Me.Left = ((frmMain.Width - Me.Width) / 2)
Refresh_VehicleList()
The problem is that when this window opens, you can actually see the
form move. It seems that if i remove the call to refresh_vehiclelist
that the problem isnt as bad, but is still visible. This procedure
makes SQL server calls so tends to pause briefly as it opens the
connection. Its not a speed issue with the hardware as its a current
Core 2 Duo system.
My question is, is there anyway to hide the form before moving it (I
tried the Hide method but it didnt move) so that the user can not see
the form moving every time they open it?
Many thanks in advance!
Brad.