1.Private Sub Command1_Click()
Timer1.Enabled = True
Timer1.Interval = 50
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Timer1_Timer()
Label1.Left = Label1.Left - 50
If Label1.Left < 0 Then
Label1.Left = Form1.Width
End If
End Sub
2.Dim st As String             
Private Sub Command1_Click()
    st = Text1.SelText       
    Text1.SelText = ""       
End Sub
Private Sub Command2_Click()
    st = Text1.SelText     
End Sub
Private Sub Command3_Click()
                 
  Text1.SelText = st       
End Sub
Private Sub Command4_Click()
  Text1.FontName = "黑体"
End Sub
Private Sub Command5_Click()
  Text1.FontSize = 20
End Sub
Private Sub Command6_Click()
  End
End Sub
3.Dim c!, f!
Private Sub Command1_Click()
f = Val(Text1.Text)
c = 5 / 9 * (f - 32)
Text2 = c
End Sub
Private Sub Command2_Click()
c = Val(Text2.Text)
f = 9 / 5 * c + 32
Text1 = f
vb所有代码End Sub
Private Sub Command3_Click()
Text1 = ""
Text2 = ""
'
4.Private Sub Command1_Click()
If Text1 = "666666" Then
  MsgBox "密码正确,欢迎你!"
  End
Else
  Text1 = ""
  Text1.SetFocus
End If
End Sub
Private Sub Command2_Click()
End
End Sub
5.Private Sub Command1_Click()
End
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
  If Text1 = "1" Then
    MsgBox "您选择的是可乐,欢迎下次光临!", , "结果"
  ElseIf Text1 = "2" Then
    MsgBox "您选择的是雪碧,欢迎下次光临!", , "结果"
  ElseIf Text1 = "3" Then
    MsgBox "您选择的是橙汁,欢迎下次光临!", , "结果"
  ElseIf Text1 = "4" Then
    MsgBox "您选择的是咖啡,欢迎下次光临!", , "结果"
  Else
    i = MsgBox("您输入有误,请重新选择!", 5 + 48, "提示")
    If i = 4 Then
        Text1 = ""
        Text1.SetFocus
    Else
        End
    End If
  End If
End If
6.Private Sub Command1_Click()
Dim n_jsj%, n_user%, m%

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。