
public Leaf(string name) : base(name) { }
public override void Add(Component c)
{
Console.WriteLine("宽虚烂Cannot add to a leaf")
}
public override void Remove(Component c)
{
Console.WriteLine("Cannot remove to a leaf")
}
public override void Display(int depth)
{
Console.WriteLine(new string('慎漏-'誉衡,depth)+name)
}
}
在能帮助你,找到他的坐标,和寻找图片但是其他的,我就没办法了,
代码ERSION 5.00
Begin VB.Form Form1
Caption = "鼠标腊弯和位置跟踪"
ClientHeight= 3144
ClientLeft = 48
ClientTop = 348
ClientWidth = 3012
LinkTopic = "Form1"闹雹
ScaleHeight = 3144
ScaleWidth = 3012
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "设置坐标"
Height = 372
Left= 960
TabIndex= 9
Top = 2160
Width = 852
End
Begin VB.TextBox Text2
Height = 264
Left= 1680
TabIndex= 2
Text= "Text1"
Top = 1800
Width = 972
End
Begin VB.TextBox Text1
Height = 264
Left= 1680
TabIndex= 1
Text= "Text1"
Top = 1320
Width = 972
End
Begin VB.CommandButton Command1
Caption = "退出程序"
Height = 372
Left= 960
TabIndex= 0
Top = 2640
Width = 852
End
Begin VB.Label Label6
Caption = "鼠标的轮盯Y坐标:"
Height = 372
Left= 240
TabIndex= 8
Top = 1800
Width = 1212
End
Begin VB.Label Label5
Caption = "鼠标的X坐标:"
Height = 372
Left= 240
TabIndex= 7
Top = 1320
Width = 1212
End
Begin VB.Label Label4
Caption = "Label1"
Height = 372
Left= 1800
TabIndex= 6
Top = 720
Width = 732
End
Begin VB.Label Label3
Caption = "Label1"
Height = 372
Left= 1800
TabIndex= 5
Top = 240
Width = 732
End
Begin VB.Label Label2
Caption = "鼠标的Y坐标:"
Height = 372
Left= 240
TabIndex= 4
Top = 720
Width = 1212
End
Begin VB.Label Label1
Caption = "鼠标的X坐标:"
Height = 372
Left= 240
TabIndex= 3
Top = 240
Width = 1212
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Private Sub Command1_Click()
End
End Sub
Private Sub Command2_Click()
If IsNumeric(Text1) And IsNumeric(Text2) Then
i = SetCursorPos(Text1, Text2)
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim rc As Long
Dim lpPoint As POINTAPI
rc = GetCursorPos(lpPoint)
Label3.Caption = lpPoint.x
Label4.Caption = lpPoint.y
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)