Place WinForm On Bottom-Right

前端 未结 5 1709
盖世英雄少女心
盖世英雄少女心 2020-12-10 23:47

How can I place a form at the bottom-right of the screen when it loads using C#?

5条回答
  •  盖世英雄少女心
    2020-12-11 00:36

    Form2 a = new Form2();
    a.StartPosition = FormStartPosition.Manual;
    a.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - a.Width, 
                           Screen.PrimaryScreen.WorkingArea.Height - a.Height);
    

提交回复
热议问题