vb 编程用鼠标点击随机出现的靶子,打中不同区域,得分不同。用两个Label控件分别显示点击次数和得分。如

[复制链接]
查看11 | 回复1 | 2012-7-5 15:30:38 | 显示全部楼层 |阅读模式
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)Distance = Int(Sqr((Y - (Shape1(0).Top + Shape1(0).Height \ 2)) ^ 2 + (X - (Shape1(0).Left + Shape1(0).Width \ 2)) ^ 2))
If Distance < Shape1(2).Height \ 2 Then
Score = Score + 10
ElseIf Distance < Shape1(1).Height...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行