开发者

Using screen.primaryscreen for dual display

I use

Screen.PrimaryScreen.Bounds.Height

and

 Screen.PrimaryScreen.Bounds.Width

To render my window (i.e it's a percentage with all buttons etc derived from this). Will 开发者_运维知识库this work as expected for dual screens? Are there any situations where it won't work as expected?

Thanks, Richard


You might want to try

System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height 
System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width

to avoid problems with users who have larger task bars and things.

example usage of this method can be found on MSDN:

http://msdn.microsoft.com/en-us/library/system.windows.forms.screen.primaryscreen.aspx

you may also find this of interest:

http://msdn.microsoft.com/en-us/library/ms812142.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜