![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-08-15 12:24 |
共 47,813 主题排行 / 349,903 发帖 / 今日 1 篇 / 48,257 会员排行 |
| DOS疑难解答 & 问题讨论 (解答室) » 实现显示器的尺寸大小的批处理 |
| 可打印版本 1,465 / 6 |
| 第1楼 dengxinhuaisme | 发表于 2009-11-15 13:45 |
| 新手上路 发帖 5 积分 11 来自 湖南 | |
|
实现显示器的尺寸大小的批处理 各位大侠好,小弟想提一个问题。
怎样用批处理判断显示器的尺寸大小呢?然后将得到的判断节果写入一个文本文档中。然后再将此文本文档命名为显示器尺寸的名字,如:是17寸的,则命名为17.txt 小弟很菜鸟,不过很热爱批处理,后面的重命名我还是会的。 |
|
| 第2楼 AlexZhang | 发表于 2009-11-15 22:41 |
| 系统支持 发帖 438 积分 1,023 | |
|
尺寸大小?这个要看显示器驱动了吧,不是显卡驱动.我看Xorg实现了,但是移植到DOS可能不现实
|
|
| 第3楼 dengxinhuaisme | 发表于 2009-11-16 09:10 |
| 新手上路 发帖 5 积分 11 来自 湖南 | |
|
就是用批处理判断显示器是十几英寸的。
不知道怎么实现 |
|
| 第4楼 boylovedos | 发表于 2009-11-22 20:52 |
| 新手上路 发帖 4 积分 10 | |
|
好难的!我不会——观察中的小菜鸟;有会的——度假中的高手们。
让我们耐心等等吧! |
|
| 第5楼 azziporah | 发表于 2009-12-01 10:45 |
| 初级用户 发帖 47 积分 102 | |
|
Sorry I can't type Chinese currently...
First of all, you have to understand when we're talking about the SIZE of a monitor, we're ACTUALLY talking about the MAX viewable image size of a monitor, or "diameter". I have to say, due to no direct info about diameter is provided, it's not easy to get the diameter of your monitor without the help of a 3rd party tool. (BTW, the resolution is easy to get, however it can't be used to calculate the diameter of your monitor.) Recently in a computer, all info about the monitor come from EDID(a VESA defined data structure, for detail: http://en.wikipedia.org/wiki/EDID). EDID BYTE 21 and BYTE 22 define the horizontal/vertical MAX viewable image size, separately. You could get EDID via I2C, perform a calculation with EDID BYTE 21 and BYTE 22, and a conversion from centimeter to inch, the result you get is very close to the desired monitor-size. Another approach is much easier: by the name of the monitor, like "DELL E228WFP" indicating 22-inch. However even if you could get the name from EDID or Windows Registry, this isn't a reliable approach for 2 reasons. 1st reason: NOT all monitor names reflect the sizes, like "EPI EnVision EN-775e", what the hell is this size? 2nd reason: It's NOT easy to parse the name. Every naming convention differs among monitor vendors. Best way: You could use this tool: http://www.nirsoft.net/utils/dumpedid.zip (for Windows ONLY) to get EDID and diameter. usage: DumpEDID.exe > YourFile.txt or: DumpEDID.exe \\remote01 > YourFile.txt Here's a typical output by DumpEDID.exe: (NOTICE the text in RED) ************************************************************ Registry Key : DISPLAY\DELD015\5&1f944c2&0&UID16777488 Monitor Name : DELL E228WFP Serial Number : PN38083P0SVM Manufacture Week : 13 / 2008 ManufacturerID : 44048 (0xAC10) ProductID : 53269 (0xD015) Serial Number (Numeric) : 810767949 (0x3053564D) EDID Version : 1.3 Display Gamma : 2.20 Vertical Frequency : 56 - 75 Hz Horizontal Frequency : 30 - 83 KHz Image Size : 47.3 X 29.6 cm (22.0 Inch) Maximum Image Size : 47 X 30 cm (22.0 Inch) Maximum Resolution : 1280 X 1024 Support Standby Mode : Yes Support Suspend Mode : Yes Support Low-Power Mode : Yes Support Default GTF : No Digital : Yes Supported Display Modes : 720 X 400 70 Hz 640 X 480 60 Hz 640 X 480 75 Hz 800 X 600 60 Hz 800 X 600 75 Hz 1024 X 768 60 Hz 1024 X 768 75 Hz 1280 X 1024 75 Hz 1152 X 864 75 Hz 1280 X 1024 60 Hz ************************************************************ Sometimes we'll get diameters like 18.9 Inch or 17.1 Inch. It's not a big problem, I believe you know the right thing to do. ^ _ ^. . . [ Last edited by azziporah on 2009-12-2 at 08:59 ] |
|
| 第6楼 xuantian | 发表于 2009-12-07 16:21 |
| 高级用户 发帖 282 积分 587 | |
|
楼上的东东不错,可惜使用宽屏后才知道使用宽屏很痛苦:)
|
|
| 第7楼 chishingchan | 发表于 2009-12-09 01:13 |
| 银牌会员 发帖 538 积分 1,284 | |
|
对于我的10.2英寸的本本没效,显示是142英寸。支持的分辨率是空的。
|
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |