赞 | 12 |
VIP | 107 |
好人卡 | 6 |
积分 | 4 |
经验 | 31122 |
最后登录 | 2024-6-29 |
在线时间 | 1606 小时 |
Lv2.观梦者 傻♂逼
- 梦石
- 0
- 星屑
- 374
- 在线时间
- 1606 小时
- 注册时间
- 2007-3-13
- 帖子
- 6562
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
总是说:运行是错误,GetProcAddress:Get_Pos_X or Get_Pos_XA
( $Get_Pos_X = Win32API.new(DLL, 'Get_Pos_X', nil, 'l') 的错误)
$Get_Pos_X = Win32API.new(DLL, 'Get_Pos_X', nil, 'l')
$Get_Pos_Y = Win32API.new(DLL, 'Get_Pos_Y', nil, 'l')
$Left = Win32API.new(DLL, 'Get_Left', nil, 'l')
$Right = Win32API.new(DLL, 'Get_Right', nil, 'l')
$Mouse_Close = Win32API.new(DLL, 'Mouse_Close', nil, nil)
$Mouse_Start = Win32API.new(DLL, 'Mouse_Start', 'l', 'l')
DLL内容(VB)
- Private Type POINTAPI
- x As Long
- Y As Long
- End Type
- Dim p As POINTAPI
- Dim l As Long
- Dim hd
- Dim KeyTepy As Integer
- Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
- Private Declare Function ScreenToClient Lib "user32" (ByVal hWnd As Long, lpPoint As POINTAPI) As Long
- Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
- Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
- Function Get_Pos_X() As Long
- If p.x < 0 Then
- p.x = 0
- End If
- If p.x > 544 Then
- p.x = 544
- End If
- Get_Pos_X = p.x
- End Function
- Function Get_Pos_Y() As Long
- If p.Y < 0 Then
- p.Y = 0
- End If
- If p.Y > 416 Then
- p.Y = 416
- End If
- Get_Pos_Y = p.Y
- End Function
- Function Get_Left() As Integer
- Get_Left = 0
- If KeyTepy = 1 Then
- Get_Left = 1
- End If
- End Function
- Function Get_Right() As Integer
- Get_Right = 0
- If KeyTepy = 2 Then
- Get_Right = 1
- End If
- End Function
- Function Updata_Mouse() As Long
- If Mouse_Open = True Then
- Call GetCursorPos(p)
- l = ScreenToClient(hd, p)
- Dim x As Long
- x = GetAsyncKeyState(1) '左键
- KeyTepy = 0
- If x = -32767 Then
- KeyTepy = 1
- End If
-
- x = GetAsyncKeyState(2) '右键
- If x = -32767 Then
- KeyTepy = 2
- End If
- Updata_Mouse = 0
- Else
- Updata_Mouse = 1
- End If
- End Function
- Sub Mouse_Close()
- ShowCursor (1)
- l = ""
- hd = ""
- KeyTepy = ""
- End Sub
- Function Mouse_Start(hWnd As Long) As Long
- If Mouse_Open = False Then
- ShowCursor (0)
- hd = hWnd
- Mouse_Open = True
- Mouse_Start = 0
- Else
- Mouse_Start = 1
- End If
- End Function
复制代码 |
|