C# winfrom指定右下角的弹出窗体位置?

现在弹出的位置在系统的右下角,我需要它弹出时在另一个窗体(非父窗体)的右下角。

代码怎么实现?新人

//获取当前工作区宽度和高度(工作区不包含状态栏)
int ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width;
int ScreenHeight = Screen.PrimaryScreen.WorkingArea.Height;
//计算窗体显示的坐标值,可以根据需要微调几个像素
int x = ScreenWidth - this.Width - 5;
int y = ScreenHeight - this.Height - 5;

this.Location = new Point(x,y);
温馨提示:内容为网友见解,仅供参考
第1个回答  2019-03-23
个人意见。
弹出小窗体在右下角可以设置窗体的startposition
属性
设置窗体出现的位置
用show()方法就可以
,时不时弹出可以使用一个timer控件
用它设置时间
希望对你又用
相似回答