魔鬼怎么得到屏幕分辨率?? !!? [英] How the devil do I get screen resolutions??!!?

查看:107
本文介绍了魔鬼怎么得到屏幕分辨率?? !!?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哎呀!我有一个c#.net Web应用程序。我需要将屏幕高度

和宽度检索到变量中。我知道这是非常愚蠢的,但是怎么回答

我应该做什么?!?!?!


复制到 ri ******* @ gmail.com 也非常感谢。


谢谢提前。

解决方案

你好ManwSloHand,


什么样的决议,有几个人:)





SystemInformation.PrimaryMonitorSize

SystemInformation.WorkingArea

SystemInformation.VirtualScreen

Screen.PrimaryScreen.Bounds

Screen.PrimaryScreen.WorkingArea


M>哎呀!我有一个c#.net Web应用程序。我需要检索屏幕

M>高度和宽度变成一个变量。我知道这是非常愚蠢的

M>但我如何做到这一点??!?!?!

M>

M> ri*******@gmail.com 的副本也将非常感谢。

M>

M>提前致谢。

M>

---

WBR,

Michael Nemtsev ::博客:< a rel =nofollowhref =http://spaces.msn.com/laflourtarget =_ blank> http://spaces.msn.com/laflour


有时一个人仍然忠实于一个事业,只因为它的对手没有,b $ b不再是平淡无奇的。 (c)Friedrich Nietzsche


有一个名为Screen的类可以帮助你。
http://msdn.microsoft.com/library/de...mberstopic .asp

冷静一点,男人


" ManwSloHand" <毫安********* @ yahoo.com>在消息中写道

新闻:11 ********************** @ i39g2000cwa.googlegr oups.com ...

ARGH!我有一个c#.net Web应用程序。我需要将屏幕高度和宽度检索到变量中。我知道这是非常愚蠢的,但是如何确定我能做到了吗?!?!?!

复制到 ri ******* @ gmail.com 也非常感谢。

提前致谢。



>>哎呀!我有一个c#.net Web应用程序。我需要将屏幕

高度和宽度检索到变量中。我知道这是非常愚蠢的
但我怎么做呢?!?!?!



什么样的决议,有几个:) />
请参阅

SystemInformation.PrimaryMonitorSize
SystemInformation.WorkingArea
SystemInformation.VirtualScreen
Screen.PrimaryScreen.Bounds
Screen.PrimaryScreen.WorkingArea




我怀疑其中任何一个是他想要的,因为这会得到你正在运行的服务器的分辨率

我希望他想要分辨率

分辨率(注意他确实说过网络应用程序)。这需要在

客户端脚本中完成,该脚本填充变量,然后将其返回到服务器以供读取。在javascript中查询的值将是

window.screen.width和window.screen.height。

-

Tom Porterfield


ARGH! I have a c#.net web application. I need to retrieve screen height
and width into a variable. I know this is incredibly stupid but HOW THE
HECK DO I DO IT??!?!?!

A copy to ri*******@gmail.com would be much appreciate also.

Thanks in advance.

解决方案

Hello ManwSloHand,

What kind of resolution, there are several one :)

See

SystemInformation.PrimaryMonitorSize
SystemInformation.WorkingArea
SystemInformation.VirtualScreen
Screen.PrimaryScreen.Bounds
Screen.PrimaryScreen.WorkingArea

M> ARGH! I have a c#.net web application. I need to retrieve screen
M> height and width into a variable. I know this is incredibly stupid
M> but HOW THE HECK DO I DO IT??!?!?!
M>
M> A copy to ri*******@gmail.com would be much appreciate also.
M>
M> Thanks in advance.
M>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche


There is class named Screen which may help you.
http://msdn.microsoft.com/library/de...mberstopic.asp
Calm down a little bit, man

"ManwSloHand" <ma*********@yahoo.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...

ARGH! I have a c#.net web application. I need to retrieve screen height
and width into a variable. I know this is incredibly stupid but HOW THE
HECK DO I DO IT??!?!?!

A copy to ri*******@gmail.com would be much appreciate also.

Thanks in advance.



>> ARGH! I have a c#.net web application. I need to retrieve screen

height and width into a variable. I know this is incredibly stupid
but HOW THE HECK DO I DO IT??!?!?!



What kind of resolution, there are several one :)

See

SystemInformation.PrimaryMonitorSize
SystemInformation.WorkingArea
SystemInformation.VirtualScreen
Screen.PrimaryScreen.Bounds
Screen.PrimaryScreen.WorkingArea



I doubt any of that is what he wants since that would get the resolution of
the server you are running on and I would expect he wants the cleint
resolution (note he did say web application). This would need to be done in
client side script that populates variables that would then be posted back
to the server for reading. The values to query in javascript would be
window.screen.width and window.screen.height.
--
Tom Porterfield


这篇关于魔鬼怎么得到屏幕分辨率?? !!?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆