赞 | 1 |
VIP | 220 |
好人卡 | 25 |
积分 | 7 |
经验 | 51477 |
最后登录 | 2013-1-12 |
在线时间 | 943 小时 |
Lv2.观梦者 花开堪折直须折
- 梦石
- 0
- 星屑
- 686
- 在线时间
- 943 小时
- 注册时间
- 2010-7-17
- 帖子
- 4963
|
6楼
楼主 |
发表于 2010-8-19 11:03:53
|
只看该作者
算了,还是谢谢各位了,我找到了沉影不器的把普通窗口改大的脚本。。= =- GWL_STYLE = -16
- WS_BORDER = 0x800000
- SWP_SHOWWINDOW = 0x40
- PELSHEIGHT = 0x100000
- PEDTH = 0x80000
- ##BITSPERPEL = 0x40000
- ##DISPLAYFREQUENCY = 0x400000
- CDS_TEST = 0x1
- def get_devmode
- device_name = ["\0" * 32].pack("a*")
- spec_version = [0].pack("I")
- driver_version = [0].pack("I")
- size = [0].pack("I")
- driver_extra = [0].pack("I")
- fields = [PELSHEIGHT|PEDTH].pack("Q")##PELSHEIGHT|PEDTH
- orientation = [0].pack("I")
- paper_size = [0].pack("I")
- paper_length = [0].pack("I")
- paper_width = [0].pack("I")
- scale = [0].pack("I")
- copies = [0].pack("I")
- default_source = [0].pack("I")
- print_quality = [0].pack("I")
- color = [0].pack("I")
- duplex = [0].pack("I")
- y_resolution = [0].pack("I")
- tt_option = [0].pack("I")
- collate = [0].pack("I")
- form_name = ["\0" * 32].pack("a*")
- unused_padding = [0].pack("I")
- bits_per_pel = [32].pack("I")##32
- pedth = [800].pack("Q")##1024
- pels_height = [600].pack("Q")##768
- display_flags = [0].pack("Q")
- display_frequency = [75].pack("Q")##75
-
- string = device_name + spec_version + driver_version + size + driver_extra + fields + orientation + paper_size + paper_length + paper_width + scale + copies + default_source + print_quality + color + duplex + y_resolution + tt_option + collate + form_name + unused_padding + bits_per_pel + pedth + pels_height + display_flags + display_frequency
- return string
- end
- GetForegroundWindow = Win32API.new ('user32', 'GetForegroundWindow', '', 'l')
- EDS = Win32API.new('user32', 'EnumDisplaySettingsA', 'plp', 'l')
- CDS = Win32API.new('user32', 'ChangeDisplaySettingsA', 'pl', 'l')
- ##GetWindowLong = Win32API.new('user32', 'GetWindowLongA', 'pl', 'l')
- SetWindowLong = Win32API.new('user32', 'SetWindowLongA', 'pll', 'l')
- SetWindowPos = Win32API.new('user32', 'SetWindowPos', 'lliiiii', 'i')
- def handel
- return GetForegroundWindow.call()
- end
- ##p GetWindowLong.call(handel, GWL_STYLE)
- ##Graphics.resize_screen(640,480)
- devmode = get_devmode
- EDS.call("", 0, devmode)
- CDS.call(devmode, CDS_TEST)
- SetWindowLong.call(handel, GWL_STYLE, WS_BORDER)
- SetWindowPos.call(handel, -1, 0, 0, 1200, 800, SWP_SHOWWINDOW)
复制代码 |
|