- 注册时间
- 2003-12-30
- 最后登录
- 2019-12-25
管理员
环球旅行中
  
- 积分
- 12370
|
发表于 2005-7-5 22:25:23
|
显示全部楼层
#ウィンドウサイズの変更(v1.00)
class Win32API
GAME_INI_FILE = \".\\\\Game.ini\"
def Win32API.GetPrivateProfileString(section, key)
val = \"\\0\"*256
gps = Win32API.new(\'kernel32\', \'GetPrivateProfileString\',%w(p p p p l p), \'l\')
gps.call(section, key, \"\", val, 256, GAME_INI_FILE)
val.delete!(\"\\0\")
return val
end
def Win32API.FindWindow(class_name, title)
fw = Win32API.new(\'user32\', \'FindWindow\', %(p, p), \'i\')
hWnd = fw.call(class_name, title)
return hWnd
end
HWND_TOP = 0
HWND_TOPMOST = -1
SWP_NOMOVE = 2
def Win32API.SetWindowPos(hWnd, w, h)
swp = Win32API.new(\'user32\', \'SetWindowPos\', %(l, l, i, i, i, i, i), \'i\')
ok = swp.call(hWnd, HWND_TOP, 0, 0, w, h, SWP_NOMOVE)
# 下の行を有効にすると、常に前面に表示されるウィンドウになる。
#ok = swp.call(hWnd, HWND_TOPMOST, 0, 0, w, h, SWP_NOMOVE)
return ok
end
end
title = Win32API.GetPrivateProfileString(\"Game\", \"Title\")
hWnd = Win32API.FindWindow(\"RGSS Player\", title)
# 幅320、高さ480に変更
ok = Win32API.SetWindowPos(hWnd, 320, 480)
if(ok == 0)
p \"サイズ変更失敗\"
end
[em13][em13]
原作者是谁来着?
|
|