早教吧作业答案频道 -->其他-->
VB代码翻译中文`急用`谢谢`各位高手帮忙``Dim鼠XAsSingleDim鼠YAsSingleDim地鼠AsByteDim对数AsIntegerDim总数AsIntegerSub判断(X,Y)SelectCase地鼠Case0,1,2X=地鼠Y=0Case3,4,5X=地鼠-3Y=1
题目详情
VB代码翻译中文`急用`谢谢`各位高手帮忙``
Dim 鼠X As Single
Dim 鼠Y As Single
Dim 地鼠 As Byte
Dim 对数 As Integer
Dim 总数 As Integer
Sub 判断(X, Y)
Select Case 地鼠
Case 0, 1, 2
X = 地鼠
Y = 0
Case 3, 4, 5
X = 地鼠 - 3
Y = 1
Case 6, 7, 8
X = 地鼠 - 6
Y = 2
End Select
End Sub
Private Sub Form_Load()
Randomize
Show
Print
For 地鼠 = 0 To 8
判断 X, Y
Form1.PaintPicture Image5.Picture, 1000 + 1050 * X, 1000 + 1050 * Y
Next
总数 = 1
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Move X - Image1.Width / 2, Y - Image1.Height / 2
鼠X = Image1.Left
鼠Y = Image1.Top
Timer1.Enabled = True
Label2.Caption = "运行中..."
End Sub
Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Picture = Image3.Picture
xy = 99
If 鼠X > 800 And 鼠X < 1850 Then
If 鼠Y + 1500 > 1600 And 鼠Y + 1500 < 2350 Then xy = 0
If 鼠Y + 1500 > 2650 And 鼠Y + 1500 < 3400 Then xy = 3
If 鼠Y + 1500 > 3700 And 鼠Y + 1500 < 4450 Then xy = 6
End If
If 鼠X > 1850 And 鼠X < 2900 Then
If 鼠Y + 1500 > 1600 And 鼠Y + 1500 < 2350 Then xy = 1
If 鼠Y + 1500 > 2650 And 鼠Y + 1500 < 3400 Then xy = 4
If 鼠Y + 1500 > 3700 And 鼠Y + 1500 < 4450 Then xy = 7
End If
If 鼠X > 2900 And 鼠X < 3950 Then
If 鼠Y + 1500 > 1600 And 鼠Y + 1500 < 2350 Then xy = 2
If 鼠Y + 1500 > 2650 And 鼠Y + 1500 < 3400 Then xy = 5
If 鼠Y + 1500 > 3700 And 鼠Y + 1500 < 4450 Then xy = 8
End If
If 地鼠 = xy Then
对数 = 对数 + 1
Label1.Caption = "打中次数 :" & 对数
判断 X, Y
Form1.PaintPicture Image6.Picture, 1000 + 1050 * X, 1000 + 1050 * Y
End If
End Sub
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Move 鼠X - (Image1.Width / 2 - X), 鼠Y - (Image1.Height / 2 - Y)
鼠X = Image1.Left
鼠Y = Image1.Top
End Sub
Private Sub Image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Picture = Image2.Picture
End Sub
Private Sub Timer1_Timer()
总数 = 总数 + 1
判断 X, Y
Form1.PaintPicture Image5.Picture, 1000 + 1050 * X, 1000 + 1050 * Y
地鼠 = Int(Rnd * 9)
判断 X, Y
Form1.PaintPicture Image4.Picture, 1000 + 1050 * X, 1000 + 1050 * Y
If 总数 > 100 Then
Timer1.Enabled = False
判断 X, Y
Form1.PaintPicture Image5.Picture, 1000 + 1050 * X, 1000 + 1050 * Y
If 对数 > 100 Then
msg = MsgBox("恭喜" + Chr(13) + "你以经爆机了,还要继续吗?", vbYesNo, "地鼠娱乐部")
Else
msg = MsgBox("你以经过关了,您打中了" & 对数 & "次.还要继续吗?", vbYesNo, "地鼠娱乐部")
End If
If msg = vbYes Then
总数 = 1
对数 = 0
Timer1.Enabled = True
Else
Unload Me
End If
End If
End Sub
各位高手```我就20分了```帮帮忙帮我翻译```````谢谢```
急用`````
Dim 鼠X As Single
Dim 鼠Y As Single
Dim 地鼠 As Byte
Dim 对数 As Integer
Dim 总数 As Integer
Sub 判断(X, Y)
Select Case 地鼠
Case 0, 1, 2
X = 地鼠
Y = 0
Case 3, 4, 5
X = 地鼠 - 3
Y = 1
Case 6, 7, 8
X = 地鼠 - 6
Y = 2
End Select
End Sub
Private Sub Form_Load()
Randomize
Show
For 地鼠 = 0 To 8
判断 X, Y
Form1.PaintPicture Image5.Picture, 1000 + 1050 * X, 1000 + 1050 * Y
Next
总数 = 1
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Move X - Image1.Width / 2, Y - Image1.Height / 2
鼠X = Image1.Left
鼠Y = Image1.Top
Timer1.Enabled = True
Label2.Caption = "运行中..."
End Sub
Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Picture = Image3.Picture
xy = 99
If 鼠X > 800 And 鼠X < 1850 Then
If 鼠Y + 1500 > 1600 And 鼠Y + 1500 < 2350 Then xy = 0
If 鼠Y + 1500 > 2650 And 鼠Y + 1500 < 3400 Then xy = 3
If 鼠Y + 1500 > 3700 And 鼠Y + 1500 < 4450 Then xy = 6
End If
If 鼠X > 1850 And 鼠X < 2900 Then
If 鼠Y + 1500 > 1600 And 鼠Y + 1500 < 2350 Then xy = 1
If 鼠Y + 1500 > 2650 And 鼠Y + 1500 < 3400 Then xy = 4
If 鼠Y + 1500 > 3700 And 鼠Y + 1500 < 4450 Then xy = 7
End If
If 鼠X > 2900 And 鼠X < 3950 Then
If 鼠Y + 1500 > 1600 And 鼠Y + 1500 < 2350 Then xy = 2
If 鼠Y + 1500 > 2650 And 鼠Y + 1500 < 3400 Then xy = 5
If 鼠Y + 1500 > 3700 And 鼠Y + 1500 < 4450 Then xy = 8
End If
If 地鼠 = xy Then
对数 = 对数 + 1
Label1.Caption = "打中次数 :" & 对数
判断 X, Y
Form1.PaintPicture Image6.Picture, 1000 + 1050 * X, 1000 + 1050 * Y
End If
End Sub
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Move 鼠X - (Image1.Width / 2 - X), 鼠Y - (Image1.Height / 2 - Y)
鼠X = Image1.Left
鼠Y = Image1.Top
End Sub
Private Sub Image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Picture = Image2.Picture
End Sub
Private Sub Timer1_Timer()
总数 = 总数 + 1
判断 X, Y
Form1.PaintPicture Image5.Picture, 1000 + 1050 * X, 1000 + 1050 * Y
地鼠 = Int(Rnd * 9)
判断 X, Y
Form1.PaintPicture Image4.Picture, 1000 + 1050 * X, 1000 + 1050 * Y
If 总数 > 100 Then
Timer1.Enabled = False
判断 X, Y
Form1.PaintPicture Image5.Picture, 1000 + 1050 * X, 1000 + 1050 * Y
If 对数 > 100 Then
msg = MsgBox("恭喜" + Chr(13) + "你以经爆机了,还要继续吗?", vbYesNo, "地鼠娱乐部")
Else
msg = MsgBox("你以经过关了,您打中了" & 对数 & "次.还要继续吗?", vbYesNo, "地鼠娱乐部")
End If
If msg = vbYes Then
总数 = 1
对数 = 0
Timer1.Enabled = True
Else
Unload Me
End If
End If
End Sub
各位高手```我就20分了```帮帮忙帮我翻译```````谢谢```
急用`````
▼优质解答
答案和解析
你将不是引号里的中文都改成字母就可以了
中文只能在“”中当字符用,其他都不行
中文只能在“”中当字符用,其他都不行
看了 VB代码翻译中文`急用`谢谢...的网友还看了以下:
已知字母组合成英语单词1、e e t t i n h r 2、e e r a t w h 3、o 2020-05-14 …
用c.e.i.a.t.v可以组成一个什么单词? 2020-05-21 …
纵横字谜之英语暑假作业题(s)(o)(r)(r)(n)(g)(r)(e))(a)(k)(k)(e) 2020-06-06 …
求下面函数的解释,看不懂function A = fun(W)[m,n] = size(W); e 2020-06-27 …
1.单词辨音,下列单词括号部分发音相同的打√,不同的打×.⒈wh(i)ten(i)ce()⒉m(e 2020-07-05 …
重组字母为单词e,e,r,w,he,e,r,t,he,e,se,a,sw,m,s,ir,t,p,i 2020-07-09 …
英语单词填空1.时间状语:d-r-n-2.场所:b-s-s-o-f-r--e-a-t-e-t3.教 2020-07-14 …
实数的复幂指数算法原理如e^(-i*a)a常实数 2020-08-01 …
设集合M={1,2,3,4,5,6},对于ai,bi∈M,记ei=aibi且ai<bi,由所有ei组 2020-11-01 …
把给的字母中多余的一个字母丢掉,再把正确的单词拼出来(1)s,t,e,b,a,k,e(2)r,t,a 2020-12-14 …