C# 如何为分辨率为1080*1920的系统开发win form应用程序

C# 如何为分辨率为1080*1920的系统开发win form应用程序,c#,winforms,C#,Winforms,我想开发一个windows窗体应用程序,其中目标系统的屏幕分辨率为1080x1920。但我的系统不接受这一决议。甚至我也不能将我的winform大小设置为1080x1920。 有人能帮我解决这个问题吗这对我很有用。这是表单的加载事件(可以通过在设计器中双击表单来生成此事件)。在本例中,我们检查包含表单的屏幕的当前尺寸。然后我们将表单大小设置为匹配。我们也会将窗体的位置移动到0,0,这样它就不会从屏幕上消失 //the name of this function will be diffe

我想开发一个windows窗体应用程序,其中目标系统的屏幕分辨率为1080x1920。但我的系统不接受这一决议。甚至我也不能将我的winform大小设置为1080x1920。
有人能帮我解决这个问题吗这对我很有用。这是表单的加载事件(可以通过在设计器中双击表单来生成此事件)。在本例中,我们检查包含表单的屏幕的当前尺寸。然后我们将表单大小设置为匹配。我们也会将窗体的位置移动到0,0,这样它就不会从屏幕上消失

    //the name of this function will be different for you.
    //generate this function by double clicking the form in designer.
    //the code inside the function is what you're interested in.
    private void MainForm_Load(object sender, EventArgs e)
    {
        Rectangle screenSize = Screen.GetBounds(this); //find out the current screen size
        this.Top = 0; //move the form to top
        this.Left = 0; //move the form to left
        this.Width = screenSize.Width; //set form width to screen width
        this.Height = screenSize.Height; //set form height to screen height
    }
编辑:还有,为什么不最大化呢

        this.WindowState = FormWindowState.Maximized;

…这是一个垂直旋转的屏幕吗?标准高清尺寸为1920x1080,因此,除非您为垂直(纵向)屏幕设计此表单,否则您可能会将x和y向后移动此屏幕旋转。我建议一种方法。在表单设计器代码中,创建一个if代码,如果该代码为true,则您的按钮和其他表单工作人员将根据百分比计算创建。我如何设计它?解释“我的系统不接受该解决方案”的含义。