赞 | 12 |
VIP | 107 |
好人卡 | 6 |
积分 | 4 |
经验 | 31122 |
最后登录 | 2024-6-29 |
在线时间 | 1606 小时 |
Lv2.观梦者 傻♂逼
- 梦石
- 0
- 星屑
- 374
- 在线时间
- 1606 小时
- 注册时间
- 2007-3-13
- 帖子
- 6562
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 yangff 于 2010-12-26 18:52 编辑
!12.26重要更新!
修复了因FreeLibrary导致的错误
Win7测试不通过……Win7的任务栏太牛逼了……
激活窗体盖不住,强行置顶盖不住……我无语了
调用setwindow,自行给$hwnd赋值(我管你用什么办法,反正我这里用的是APIHOOK……250果断报毒中)
代码- $rect_yangff=[0,0,0,0]
- def setwindow
-
- gsm=Win32API.new("user32","GetSystemMetrics","l","l")
- 转换宽度=gsm.call(0)
- 转换高度=gsm.call(1)
- $转换比x=$原宽度.to_f/转换宽度.to_f
- $转换比y=$原高度.to_f/转换高度.to_f
- hWnd = $hwnd
- swp = Win32API.new('window', 'SetMaxWindow', 'llp', '')
- a=$rect_yangff
- s=a.pack("llll")
- swp.call(hWnd,$yangff_fenbianlv_onces?1:0,s)
- a=s.unpack("llll")
- $rect_yangff=a
- if $yangff_fenbianlv_onces
- $yangff_fenbianlv_onces=false
- else
- $yangff_fenbianlv_onces=true
-
- end
- end
复制代码 Dll
window.rar
(3.53 KB, 下载次数: 222)
为什么写成了Dll?因为调用的Api有点小多……关键是这个dll本来还有防破解啊,自动1024*768啊,当然也包含了那个取得hwnd的东西,只不过这个是剥离出来的功能……怕那个dll上去没人会用……250爆各种毒……
Dll的源代码是
- #COMPILER PBWIN 9
- #COMPILE DLL
- %USEMACROS = 1
- #INCLUDE "Win32API.inc"
- GLOBAL ghInstance AS DWORD
- '-------------------------------------------------------------------------------
- ' Main DLL entry point called by Windows...
- '
- FUNCTION LIBMAIN (BYVAL hInstance AS LONG, _
- BYVAL fwdReason AS LONG, _
- BYVAL lpvReserved AS LONG) AS LONG
- 'maxwindow=0 '0 no 1 yes
- SELECT CASE fwdReason
- CASE %DLL_PROCESS_ATTACH
- 'Indicates that the DLL is being loaded by another process (a DLL
- 'or EXE is loading the DLL). DLLs can use this opportunity to
- 'initialize any instance or global data, such as arrays.
- ghInstance = hInstance
- FUNCTION = 1 'success!
- 'FUNCTION = 0 'failure! This will prevent the EXE from running.
- CASE %DLL_PROCESS_DETACH
- 'Indicates that the DLL is being unloaded or detached from the
- 'calling application. DLLs can take this opportunity to clean
- 'up all resources for all threads attached and known to the DLL.
- FUNCTION = 1 'success!
- 'FUNCTION = 0 'failure!
- CASE %DLL_THREAD_ATTACH
- 'Indicates that the DLL is being loaded by a new thread in the
- 'calling application. DLLs can use this opportunity to
- 'initialize any thread local storage (TLS).
- FUNCTION = 1 'success!
- 'FUNCTION = 0 'failure!
- CASE %DLL_THREAD_DETACH
- 'Indicates that the thread is exiting cleanly. If the DLL has
- 'allocated any thread local storage, it should be released.
- FUNCTION = 1 'success!
- 'FUNCTION = 0 'failure!
- END SELECT
- END FUNCTION
- '-------------------------------------------------------------------------------
- ' Examples of exported Subs and functions...
- '
- SUB SetMaxWindow ALIAS "SetMaxWindow" (BYVAL hWnd AS LONG,BYVAL maxwindow AS LONG,r AS RECT) EXPORT
- DIM lstyle AS DWORD
- ' code goes here
- IF maxwindow=0 THEN
- maxwindow=1
- GetWindowRect(hwnd,r)
- DIM w AS DWORD,h AS DWORD
- w = GetSystemMetrics(0)
- h = GetSystemMetrics(1)
- SetWindowPos(hWnd,0,0,0,w,h,&H20)
- ShowWindow(hWnd,3)
- lstyle=GetWindowLong(hWnd, -16)
- lstyle = lstyle AND NOT &H80000
- lstyle = lstyle AND NOT &H10000
- lstyle = lstyle AND NOT &H20000
- lstyle = lstyle AND NOT &HC00000
- SetWindowLong hwnd,-16,lstyle
- ELSE
- maxwindow=0
- ShowWindow(hWnd,9)
- lstyle=GetWindowLong(hWnd, -16)
- lstyle = lstyle OR &H80000
- lstyle = lstyle OR &H10000
- lstyle = lstyle OR &H20000
- lstyle = lstyle OR &HC00000
- SetWindowLong hwnd,-16,lstyle
- w = GetSystemMetrics(0)
- h = GetSystemMetrics(1)
- SetForegroundWindow(hwnd)
- SetWindowPos(hWnd,0,r.nleft,r.ntop,r.nright-r.nleft,r.nbottom - r.ntop,&H20)
- SetForegroundWindow(hwnd)
- DIM hmenu AS DWORD
- hmenu=GetSystemMenu(hwnd,0)
- EnableMenuItem (hMenu, 4, 1025)
- END IF
- END SUB
复制代码 这样全屏就支持鼠标了~~~ |
评分
-
查看全部评分
|