弹出的窗口永远在屏幕右下角(WINFORM)

来源:互联网 发布:企业网站seo怎么做 编辑:程序博客网 时间:2024/06/05 01:07

 int x=0;

int y=0;

Form2 cp=new Form2();          

  if (Screen.AllScreens.Length > 0)
            {
                x = Screen.AllScreens[0].WorkingArea.Width - cp.Width;
                y = Screen.AllScreens[0].WorkingArea.Height - cp.Height;
            }

            Point point = new Point(x, y);
            cp.Location = point;
            cp.Opacity =0;
            cp.Show(); 

原创粉丝点击