问题描述:

有一个主窗口程序,需要给该程序添加一个通知子窗口。子窗口的位置为右下角。

解决方法:

在子窗口frmPopMsg的代码文件中添加如下代码:

public frmPopMsg()
        {
            InitializeComponent();
            
            int x = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Width -this.Width;
            int y = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Height -this.Height;
            Point p = new Point(x, y);
            this.PointToScreen(p);
            this.Location = p;
        }

相关文章:

  • 2021-04-05
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案