本人急需!老师的作业
如何用vb制作简单的打字练习的小游戏 --------------------编程问答-------------------- 1000大洋有人做 --------------------编程问答-------------------- 你急需,你有什么资格急需。你的老师急需你交重修费,就可以让你交,因为你要文凭。你急需作业就张口要,谁鸟你。你先满足你老师急需重修费的需求吧。 --------------------编程问答-------------------- 好好学习,天天向上。 --------------------编程问答-------------------- 现在的学生.................他们要多少岁后才能有本事养家啊. --------------------编程问答-------------------- good good study ,自己作业自己做 --------------------编程问答-------------------- 专业代写作业,量大从优,单身漂亮女生八折! --------------------编程问答-------------------- 现在的学生啊 --------------------编程问答-------------------- http://download.csdn.net/detail/zhao4zhong1/4084259VERSION 5.00--------------------编程问答-------------------- 还真有帮忙的。 --------------------编程问答-------------------- 好像真有人在http://www.csto.com/上发楼主这种任务哦 --------------------编程问答-------------------- 老师的作业管
Object = "{C1A8AF28-1257-101B-8FB0-0020AF039CA3}#1.1#0"; "MCI32.OCX"
Begin VB.Form Form1
BackColor = &H00000000&
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 7200
ClientLeft = 0
ClientTop = 0
ClientWidth = 9600
Icon = "KG.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "KG.frx":030A
ScaleHeight = 7200
ScaleWidth = 9600
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Timer Timer2
Enabled = 0 'False
Left = 120
Top = 2640
End
Begin VB.Timer Timer1
Interval = 100
Left = 120
Top = 2160
End
Begin MCI.MMControl wav
Height = 495
Left = 0
TabIndex = 3
Top = 0
Visible = 0 'False
Width = 3540
_ExtentX = 6244
_ExtentY = 873
_Version = 393216
DeviceType = ""
FileName = ""
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "0"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 615
Left = 8760
TabIndex = 2
Top = 6480
Width = 735
End
Begin VB.Label txt
BackStyle = 0 'Transparent
Caption = "0"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 615
Left = 480
TabIndex = 1
Top = 6480
Width = 735
End
Begin VB.Label lb
BackStyle = 0 'Transparent
Caption = "A"
BeginProperty Font
Name = "Arial Black"
Size = 249.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 6975
Left = 2640
TabIndex = 0
Top = 0
Width = 5655
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Const MOV = 15
Dim B(0 To 8) As String * 8
Dim sz As Integer
Dim L As Integer
Dim M As Integer
Dim N As Integer
Dim s As Integer
Dim c As Integer
Dim g As Integer
Dim r As Boolean
Dim Sound As Boolean
Dim Done As Boolean
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 32 Then Timer1.Enabled = Not Timer1.Enabled: Exit Sub
If KeyAscii = 27 Then End
If KeyAscii = 19 Then Sound = Not Sound: Exit Sub
If Not Timer1.Enabled Then Exit Sub
If KeyAscii = 9 Then
s = Int(s / 10) * 10 + 10
lb.Visible = False
g = 0
r = True
Exit Sub
End If
If UCase(Chr(KeyAscii)) = Mid(lb.Caption, 1, 1) Then
lb.Visible = False
g = 0
r = True
If Sound Then WAVPlay (App.Path + "\ok" + CStr(c Mod 3) + ".wav")
Else
lb.Visible = False
g = 0
r = False
c = 0
s = s - 1
If s < 0 Then s = 0
If Sound Then WAVPlay (App.Path + "\err.wav")
End If
End Sub
Private Sub Form_Load()
If App.PrevInstance Then End
ChDrive App.Path
ChDir App.Path
wav.Notify = False
wav.Wait = True
wav.Shareable = False
wav.TimeFormat = 0&
wav.DeviceType = "WaveAudio"
Sound = True
Randomize
c = 0
s = 0
g = 0
txt.Caption = CStr(s)
Label1.Caption = CStr(c)
L = 0
B(0) = "ASDFJKL;"
B(1) = "QWERUIOP"
B(2) = "ZXCVM,./"
B(3) = "TYGHBNYB"
B(4) = "12347890"
B(5) = "56-=\[]'"
B(6) = "<>?:{}" + Chr(34) + ":"
B(7) = "&*()_|+*"
B(8) = "!@#$%^~^"
sz = 75
lb.Caption = Mid(B(0), 1 + Int(Rnd * 8), 1)
lb.Font.Size = sz
lb.Top = 2500 - (sz - 75) * 16
lb.Left = 3200 + (250 - sz) * 6
lb.ForeColor = QBColor(9 + Int(Rnd * 7))
If Sound Then WAVPlay (App.Path + "\fly.wav")
End Sub
Private Sub Timer1_Timer()
Form1.SetFocus
If lb.Visible = False Then
g = g + 1
If g >= 5 Then
g = 0
If r Then
If c < 2 Then
c = c + 1
Else
c = 0
s = s + 1
If Sound Then
If (s Mod 10) = 0 Then
WAVPlay (App.Path + "\lvu.wav")
Sleep (400)
End If
End If
End If
End If
L = Int(s / 10)
If L > 8 Then
L = 8
N = 9
Else
N = s Mod 10
End If
If N > 3 Then
M = L - Int(N * Rnd) Mod (L + 1)
Else
M = L
End If
lb.Caption = Mid(B(M), 1 + Int(Rnd * 8), 1)
If lb.Caption = "&" Then lb.Caption = "&&"
sz = 75
lb.Font.Size = sz
lb.Top = 2500 - (sz - 75) * 16
lb.Left = 3200 + (250 - sz) * 6
lb.ForeColor = QBColor(9 + Int(Rnd * 7))
lb.Visible = True
txt.Caption = CStr(s)
Label1.Caption = CStr(c)
If Sound Then WAVPlay (App.Path + "\fly.wav")
Else
If Not r Then
sz = 250
lb.Font.Size = sz
lb.Top = 2500 - (sz - 75) * 16
lb.Left = 3200 + (250 - sz) * 6
lb.Visible = True
End If
End If
Exit Sub
End If
If g > 0 Then lb.Visible = False: Exit Sub
If sz >= 250 Then
lb.Visible = False
g = 0
r = False
c = 0
s = s - 1
If s < 0 Then s = 0
If Sound Then WAVPlay (App.Path + "\err.wav")
Exit Sub
End If
sz = sz + 5
lb.Font.Size = sz
lb.Top = 2500 - (sz - 75) * 16
lb.Left = 3200 + (250 - sz) * 6
Select Case Int(Rnd * 8)
Case 0
lb.Top = lb.Top + MOV
Case 1
lb.Left = lb.Left + MOV
Case 2
lb.Top = lb.Top - MOV
Case 3
lb.Left = lb.Left - MOV
Case 4
lb.Top = lb.Top + MOV
lb.Left = lb.Left + MOV
Case 5
lb.Top = lb.Top - MOV
lb.Left = lb.Left + MOV
Case 6
lb.Top = lb.Top + MOV
lb.Left = lb.Left - MOV
Case 7
lb.Top = lb.Top - MOV
lb.Left = lb.Left - MOV
End Select
End Sub
Sub WAVPlay(WavName As String)
wav.Command = "Stop"
wav.Command = "Close"
wav.FileName = WavName
wav.Command = "Open"
wav.Command = "Play"
'Sleep (wav.Length + 300)
End Sub
Sub Sleep(ms As Long)
Done = False
Timer2.Interval = ms
Timer2.Enabled = True
Do
DoEvents
Loop Until Done
End Sub
Private Sub Timer2_Timer()
Timer2.Interval = 0
Timer2.Enabled = False
Done = True
End Sub
老师的作业管你什么事,又不是你的作业。 --------------------编程问答-------------------- +10086还真的是老师的,不是他自己的作业啊……
这笨老师,这都不会…… --------------------编程问答-------------------- 这坚决不能写。。。 --------------------编程问答--------------------
楼主自己为什么一点都不写呢。。。
- -。 你不能这么伸手啊。。。。。
话说8楼发的看不懂。。。。。。我才刚学VB。。。。 --------------------编程问答-------------------- 楼上有人已经给他代码了,就看他会不会用了。
有不懂得问百度。。 --------------------编程问答-------------------- 除
补充:VB , 网络编程