Chinaunix首页 | 论坛 | 博客
  • 博客访问: 818204
  • 博文数量: 101
  • 博客积分: 1311
  • 博客等级: 中尉
  • 技术积分: 1191
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-25 12:15
文章分类

全部博文(101)

文章存档

2012年(101)

分类: 嵌入式

2012-06-12 23:29:19

1.获取当前屏幕显示区域大小,不包含任务栏. 即任务栏以上的宽度和高度

Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height

2.获取当前屏幕大小,包括任务栏.

Screen.PrimaryScreen.Bounds.Width ,Screen.PrimaryScreen.Bounds.Height

3.将窗口定位到右下角方法。

this.Location = new Point(Screen.PrimaryScreen.Bounds.Width - this.Size.Width, Screen.PrimaryScreen.WorkingArea.Height - this.Size.Height);

注意高度必须用workingarea,要不然任务栏会遮盖住窗口下面部分。

this.Location = new Point(Screen.PrimaryScreen.Bounds.Width - this.Size.Width, Screen.PrimaryScreen.Bounds.Height - this.Size.Height );

阅读(7496) | 评论(0) | 转发(0) |
0

上一篇:C#时间计算

下一篇:string 分隔

给主人留下些什么吧!~~