北京vb会考代码

来源:百度知道 编辑:UC知道 时间:2024/07/01 04:02:41
cd组的
注意:

我说的是
海淀区发的模拟题

老师手里有不给我们罢了

真诚地告诫:这个只是模拟题。
  我可以告诉你,毕竟都是考生,这一点应该公平。控件你得自己建立了。
  如果要程序,给我发个邮件:rchlch@yahoo.com.cn,我18:20之前在网上。
  C1:Private Sub Command1_Click()
  x = Val(Text1.Text)
  a = x ^ 2 - x
  If a = 0 Then
  MsgBox "除数为0!", vbCritical, "弹出窗口"
  Else
  Label3.Caption = 1 / a
  End If
  End Sub

  Private Sub Command2_Click()
  Label3.Caption = ""
  Text1.Text = ""
  End Sub

  C2:Private Sub Command1_Click()
  x = Val(Text1.Text)
  If x = 4000 Then
  Label2.Caption = "正确!"
  End If
  If x > 4000 Then
  Label2.Caption = "多了!"
  Else:
  If x < 4000 Then
  Label2.Caption = "少了!"
  End If
  End If
  End Sub

  C3:Private Sub Command1_Click()
  Image1.Left = 0
  Timer1.Enabled = True
  End Sub

  Private Sub Timer1_Timer()
  Image1.Left = Image1.L