加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
module Extra module_function #---------------------游戏窗口居中-------------------------------# Desktop_hwnd=Win32API.new("user32","GetDesktopWindow",'v','l').call Win_hwnd=Win32API.new("user32","GetActiveWindow",'v','L').call def Put_to_center() size=' '*16 Win32API.new("user32","GetWindowRect",'lp','v').call(Desktop_hwnd,size) size=size.unpack('l*') size_x=size[2]*3/5 size_y=size[3]*4/5 size_l=size[2]*1/5 size_u=size[3]*1/11 Win32API.new("user32","MoveWindow",%(llllll),'l').call(Win_hwnd,size_l,size_u,size_x,size_y,1) end end
module Extra
module_function
#---------------------游戏窗口居中-------------------------------#
Desktop_hwnd=Win32API.new("user32","GetDesktopWindow",'v','l').call
Win_hwnd=Win32API.new("user32","GetActiveWindow",'v','L').call
def Put_to_center()
size=' '*16
Win32API.new("user32","GetWindowRect",'lp','v').call(Desktop_hwnd,size)
size=size.unpack('l*')
size_x=size[2]*3/5
size_y=size[3]*4/5
size_l=size[2]*1/5
size_u=size[3]*1/11
Win32API.new("user32","MoveWindow",%(llllll),'l').call(Win_hwnd,size_l,size_u,size_x,size_y,1)
end
end
随便插进去
调用是 Extra.Put_to_center
自己看脚本即可 不解释
@jiahui5592986 |