急:这个vb程序显示的点怎么改成鼠标指针?

PrivateTypexyXAsSingleYAsSingleEndTypeDima(5)AsxyPrivateWithEventsTimer1AsTimerPrivat... Private Type xy
X As Single
Y As Single
End Type
Dim a(5) As xy
Private WithEvents Timer1 As Timer

Private Sub Form_Activate()
v = "please click your mouse , then try to move it !"
Form1.CurrentX = Screen.Width / 8
Form1.CurrentY = Screen.Height / 2.5
Randomize
For i = 1 To Len(v)
Form1.FontSize = 20 + 15 * Rnd
Form1.ForeColor = &HFFFFFF * Rnd
Print Mid(v, i, 1);
Next i
End Sub

Private Sub Form_Load()
Set Timer1 = Form1.Controls.Add("VB.timer", "t")
Form1.Move 0, 0, Screen.Width, Screen.Height
Timer1.Enabled = False
Timer1.Interval = 10
Form1.BackColor = &HFFFFFF
Form1.AutoRedraw = True
Form1.DrawWidth = 10
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
a(0).X = X
a(0).Y = Y
For i = 1 To 5
a(i).X = X
a(i).Y = Y
Next i
Timer1.Enabled = True
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
a(0).X = X
a(0).Y = Y
End Sub

Private Sub Timer1_Timer()
Dim i As Integer, r As Double
Cls
For i = 1 To 5
a(i).X = a(i).X + (a(i - 1).X - a(i).X) * 0.1
a(i).Y = a(i).Y + (a(i - 1).Y - a(i).Y) * 0.1
Form1.PSet (a(i - 1).X, a(i - 1).Y)
Next i
End Sub
展开
 我来答
尘入蜓孟影食1038
2010-05-22 · TA获得超过3512个赞
知道大有可为答主
回答量:2307
采纳率:87%
帮助的人:1342万
展开全部
Private Type xy
X As Single
Y As Single
End Type

Dim a(5) As xy

Private Sub Form_Activate()
v = "please click your mouse , then try to move it !"
Form1.CurrentX = Screen.Width / 8
Form1.CurrentY = Screen.Height / 2.5
Randomize
For i = 1 To Len(v)
Form1.FontSize = 20 + 15 * Rnd
Form1.ForeColor = &HFFFFFF * Rnd
Print Mid(v, i, 1);
Next i
End Sub

Private Sub Form_Load()
Me.Move 0, 0, Screen.Width, Screen.Height
Timer1.Enabled = False
Timer1.Interval = 10
Me.AutoRedraw = True
For i = 0 To 4
Picture1(i).Picture = LoadPicture("C:\WINDOWS\Cursors\3dwarro.cur")
Picture1(i).BorderStyle = 0
Picture1(i).Visible = False
Next i
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
a(0).X = X
a(0).Y = Y
For i = 1 To 5
a(i).X = X
a(i).Y = Y
Next i
Timer1.Enabled = True
Me.Cls
For i = 0 To 4
Picture1(i).Visible = True
Next i
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
a(0).X = X
a(0).Y = Y
End Sub

Private Sub Timer1_Timer()
Dim i As Integer
For i = 1 To 5
a(i).X = a(i).X + (a(i - 1).X - a(i).X) * 0.1
a(i).Y = a(i).Y + (a(i - 1).Y - a(i).Y) * 0.1
Picture1(i - 1).Move a(i - 1).X, a(i - 1).Y
Next i
End Sub
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式