개발/C#

[팁] C# 폼로드시 화면꽉차게 하기

FA1976 2018. 1. 25. 14:24

FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;

            WindowState = FormWindowState.Maximized; 


            //듀얼 모니터 꽉차게 할시

            //this.StartPosition = FormStartPosition.Manual;

            //Rectangle fullScrenn_bounds;

            //fullScrenn_bounds = Rectangle.Empty;

            //foreach (var screen in Screen.AllScreens)

            //{

            //    fullScrenn_bounds = Rectangle.Union(fullScrenn_bounds, screen.Bounds);

            //}

            //this.ClientSize = new Size(fullScrenn_bounds.Width, fullScrenn_bounds.Height);

            //this.Location = new Point(fullScrenn_bounds.Left, fullScrenn_bounds.Top);


폼로드시 화면이 꽉차게 된다.


주석처리된 부부은 듀얼모니터 꽉차게 하고 싶을때