Hi all:
This should be a no-brainer, but I have a form that will not center on the screen in spite of setting the startup position as Center Screen.
As you can see, I've tried a few different things, but nothing seems to work.
Any help will be greatly appreciated.
Ron Repp
If gray hair is a sign of wisdom, then I'm a genius.
This should be a no-brainer, but I have a form that will not center on the screen in spite of setting the startup position as Center Screen.
As you can see, I've tried a few different things, but nothing seems to work.
Code:
'Me.StartPosition = FormStartPosition.CenterScreen
Dim P As Point = New Point(System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.X, System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Y)
RefreshForm()
sTime = Now
eTime = sTime
dtDown.Value = sTime
dtUp.Value = eTime
SetMainForm = Me
'Me.SetDesktopLocation((P.X - Width) / 2, (P.Y - Height) / 2)
Visible = True
Refresh()
Any help will be greatly appreciated.
Ron Repp
If gray hair is a sign of wisdom, then I'm a genius.