How do you set the StartPosition of a Windows Forms form using code?

后端 未结 8 1557
夕颜
夕颜 2020-12-18 20:55

Is there a way to set the StartPosition of a Windows Forms form using code? It seems whatever I try results in the StartPostion being the default.

Here is what I am

8条回答
  •  梦毁少年i
    2020-12-18 21:20

    I'd suggest checking your DealsForm.Designer.cs and removing the line that sets the StartPosition in there, then doing it as you are.

    Alternatively, perhaps try setting it in the Load or Shown events of the form instead.

提交回复
热议问题