Place WinForm On Bottom-Right

前端 未结 5 1707
盖世英雄少女心
盖世英雄少女心 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:23

    try something on the lines of

    Rectangle workingArea = Screen.GetWorkingArea(this);
    this.Location = new Point(workingArea.Right - Size.Width, 
                              workingArea.Bottom - Size.Height);
    

    Hope it works well for you.

提交回复
热议问题