| 赞 | 1  | 
 
| VIP | 0 | 
 
| 好人卡 | 12 | 
 
| 积分 | 2 | 
 
| 经验 | 52910 | 
 
| 最后登录 | 2025-11-2 | 
 
| 在线时间 | 835 小时 | 
 
 
 
 
 
Lv1.梦旅人 
	- 梦石
 - 0 
 
        - 星屑
 - 201 
 
        - 在线时间
 - 835 小时
 
        - 注册时间
 - 2012-9-16
 
        - 帖子
 - 1811
 
 
 
 | 
	
2楼
 
 
 楼主 |
发表于 2012-11-10 14:07:29
|
只看该作者
 
 
 
补充:这是VX的变更窗口的脚本,用这种的话是可以让窗口变大并居中而且内容也会缩放的,不过我还是想要VA的啊。- #~ #-----------------------------------------------------------------------------
 
 - #~ # ● 只是用来窗口大小变更的
 
 - #~ #  ○ 来源秀秀Win32API教程之一(基础篇)
 
 - #~ #-----------------------------------------------------------------------------
 
 - #~ 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, 200, 200, w, h, SWP_NOMOVE)
 
 - #~    return ok
 
 - #~  end
 
 - #~ end
 
  
- #~ title =  Win32API.GetPrivateProfileString("Game", "Title")
 
 - #~ hWnd = Win32API.FindWindow("RGSS Player", title)
 
  
- #~ ok = Win32API.SetWindowPos(hWnd,800,640)
 
 - #~ if(ok == 0)
 
 - #~  p "変更失敗"
 
 - #~ end
 
  复制代码 |   
 
评分
- 
查看全部评分
 
 
 
 
 
 |