读书人

什Label3控件不能示已循的圈

发布时间: 2012-01-07 21:41:55 作者: rapoo

什Label3控件不能示已循的圈
源如下
Private Declare Function CDdoor Lib "winmm.dll " Alias "mciSendStringA " _
(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private Declare Sub Sleep Lib "kernel32 " (ByVal dwMilliseconds As Long)

Private Sub Command1_Click()
Call CDdoor( "set CDAudio door open ", 0, 0, 0)
End Sub

Private Sub Command2_Click()
Call CDdoor( "set CDAudio door closed ", 0, 0, 0)
End Sub

Private Sub Command3_Click()
Dim i As Single, x As Single
x = Text1.Text
For i = 1 To x Step 1
Call CDdoor( "set CDAudio door open ", 0, 0, 0)
Sleep (1000)
Call CDdoor( "set CDAudio door closed ", 0, 0, 0)
Label3.Caption = i //此i值法在label3控件上示
Next
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim x As Integer, y As Integer
x = (Screen.Width - Form1.Width) / 2
y = (Screen.Height - Form1.Height) / 2
Move x, y
End Sub
Private Sub Timer1_Timer()

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command3_Click
ElseIf KeyAscii = 27 Then
Text1.Text = " "
End If
End Sub


[解决办法]
系统BUSY

读书人网 >VB

热点推荐