Public Class Class1
Public Structure POINTAPI
Dim x As Integer
Dim y As Integer
End Structure
Dim p As POINTAPI
Dim l As Long
Dim hd As Long
Dim KeyTepy As Integer
Dim Mouse_Open As Boolean
Private Declare Function GetCursorPos Lib "user32" (ByRef lpPoint As POINTAPI) As Long
Private Declare Function ScreenToClient Lib "user32" (ByRef hwnd As Long, ByRef 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
Private 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
Private 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
Private Function Get_Left() As Integer
Get_Left = 0
If KeyTepy = 1 Then
Get_Left = 1
End If
End Function
Private Function Get_Right() As Integer
Get_Right = 0
If KeyTepy = 2 Then
Get_Right = 1
End If
End Function
Private 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 = ""
Mouse_Open = False
End Sub
Private Function Mouse_Start(ByVal hWnd As Long) As Long
ShowCursor(0)
hd = hWnd
Mouse_Open = True
Mouse_Start = 0
End Function
End Class
以下引用越前リョーマ于2008-2-20 16:55:29的发言:
<br><script language="javascript">
<!--
strCont="是VB的……?\r\n那不是VX用的……\r\n发VX区干嘛……";
document.write(ubb.spbShowTopic(strCont,1));
//-->
</script>是VB的……?<br>
那不是VX用的……<br>
发VX区干嘛……
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |