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

后端 未结 8 1588
夕颜
夕颜 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条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-18 21:34

    Maybe you are not alone. Maybe you are not insane. Read this (Microsoft Connect Customer Feedback):

    Windows Form StartPosition property only works for .ShowDialog method and not for .Show method

    Customer: "Windows Form StartPosition only works for .ShowDialog method and not for .Show method. Note: I have also attached simple code and images of the results."

    MS: "Unfortunately, we will not be able to fix this particular issue in a future release, as a fix here would be a breaking change to the behavior of WinForms 1, 1.1 and 2"

提交回复
热议问题