(Solved/Void) Form Start location will not update/renew after changing form size
Hi All, never thought I would be the one posting a question but this one is baffling me.
I set the form startup location to centre on my 2nd monitor (dual) last week.
This week I increased the form height to add more function but the form insists on its starting location being that of the old form.
Both Monitors are 1280 x 1024
The code for setting the location is as follows:
Dim screen As Screen
screen = screen.AllScreens(1)
Me.StartPosition = FormStartPosition.Manual
Me.Location = New System.Drawing.Point((((1280 / 2) - (Me.Width / 2)) + 1280), ((1280 / 2) - (Me.Height / 2)))
This worked just fine before I changed the form height. However, once the form size changed, the location did not update as it should have with the x,y co-ordinates still acting as if the form was the old size.
I also tried to change the location manually by entering in the exact x,y values but the form starts in the correct location and then a split second later moves back to the old incorrect location.
Is there something I am not doing to flush the old values?