Maximize form on both screens (dual screen monitor)

前端 未结 6 1206
春和景丽
春和景丽 2021-01-01 07:01

Iam looking for some hint or solution regarding following problem.

I have a .NET 2.0 WinForm dialog which operates in Dual Screen environment. The Working area is se

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-01 07:20

    this may be late, but here is an easy way to do it. It sets the size of the form from getting the size of resolution. then it places the form so it can be visible.

            int screenLeft = SystemInformation.VirtualScreen.Left;
            int screenTop = SystemInformation.VirtualScreen.Top;
            int screenWidth = SystemInformation.VirtualScreen.Width;
            int screenHeight = SystemInformation.VirtualScreen.Height;            
    
            this.Size = new System.Drawing.Size(screenWidth, screenHeight);
            this.Location = new System.Drawing.Point(screenLeft, screenTop);
    

提交回复
热议问题