Zoop

alex_zoop

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

WinForm

int iActulaWidth = Screen.PrimaryScreen.Bounds.Width;

int iActulaHeight = Screen.PrimaryScreen.Bounds.Height ;

 

WPF下的:

double dWidth = System.Windows.SystemParameters.PrimaryScreenWidth;

double dHeight = System.Windows.SystemParameters.PrimaryScreenHeight;

double dWidth2 = ActualWidth; //获取此元素的呈现宽度。若此元素时全屏的,则可以获得屏幕大小(-_-!!!)

double dHeight2 = ActualHeight; //获取此元素的呈现高度。

posted on 2011-08-23 17:23  zoop89850  阅读(30025)  评论(2编辑  收藏  举报