C# 创建新的弹出窗体,并保持窗体弹出起点为右下角

来源:互联网 发布:手机淘宝如何拍照查找 编辑:程序博客网 时间:2024/05/16 05:45

代码如下:

       sTip = new ShowTip();
       //int WID = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
       //int HEIG = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height; 
       sTip.StartPosition = FormStartPosition.Manual;                  
       sTip.Location = new Point(Cursor.Position.X-sTip.Width, Cursor.Position.Y-sTip.Height); //窗体起点为右下角
       sTip.TopMost = true; //显示在屏幕最前面
       sTip.Show(); 

原创粉丝点击