Dim a, b, c, d, e1, e2, e3, e4 As Double
Dim n As Integer
Private Sub CommandButton3_Click()
CommandButton1.Enabled = True
CommandButton2.Enabled = True
CommandButton3.Enabled = False
SlideShowWindows(Index:=1).View.EraseDrawing
Label9.Caption = ""
n = 0
TextBox1.Text = ""
Call label '调用过程
End Sub
Private Sub Label1_Click()
a = Label1.Left + Label1.Width
b = Label1.Top + 0.5 * Label1.Height
Label1.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label2_Click()
a = Label2.Left + Label2.Width
b = Label2.Top + 0.5 * Label2.Height
Label2.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label3_Click()
a = Label3.Left + Label3.Width
b = Label3.Top + 0.5 * Label3.Height
Label3.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label4_Click()
a = Label4.Left + Label4.Width
b = Label4.Top + 0.5 * Label4.Height
Label4.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label5_Click()
c = Label5.Left
d = Label5.Top + 0.5 * Label5.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e2 = b
If e2 = Label2.Top + 0.5 * Label2.Height Then n = n + 1
n = n
Label5.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label6_Click()
c = Label6.Left
d = Label6.Top + 0.5 * Label6.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e1 = b
If e1 = Label1.Top + 0.5 * Label1.Height Then n = n + 1
n = n
Label6.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label7_Click()
c = Label7.Left
d = Label7.Top + 0.5 * Label7.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e4 = b
If e4 = Label4.Top + 0.5 * Label4.Height Then n = n + 1
n = n
Label7.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label8_Click()
c = Label8.Left
d = Label8.Top + 0.5 * Label8.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e3 = b
If e3 = Label3.Top + 0.5 * Label3.Height Then n = n + 1
n = n
Label8.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub CommandButton2_Click()
SlideShowWindows(Index:=1).View.EraseDrawing
Label9.Caption = ""
TextBox1.Text = ""
CommandButton1.Enabled = True
n = 0
Call label '调用过程
End Sub
Private Sub CommandButton1_Click()
If n = 4 Then
Label9.Caption = "你真聪明!"
Else
Label9.Caption = "你再好好想想!"
End If
TextBox1.Text = n * 100 / 4
CommandButton1.Enabled = False
End Sub
'下面是一个子过程
Public Sub label()
Label1.ForeColor = 255
Label2.ForeColor = 255
Label3.ForeColor = 255
Label4.ForeColor = 255
Label5.ForeColor = 255
Label6.ForeColor = 255
Label7.ForeColor = 255
Label8.ForeColor = 255
End Sub
shuicao 发表于 2008-9-24 19:14:30
Dim a, b, c, d, e1, e2, e3, e4 As Double
Dim n As Integer
Private Sub CommandButton3_Click()
CommandButton1.Enabled = True
CommandButton2.Enabled = True
CommandButton3.Enabled = False
SlideShowWindows(Index:=1).View.EraseDrawing
Label9.Caption = ""
n = 0
TextBox1.Text = ""
Call label '调用过程
End Sub
Private Sub Label1_Click()
a = Label1.Left + Label1.Width
b = Label1.Top + 0.5 * Label1.Height
Label1.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label2_Click()
a = Label2.Left + Label2.Width
b = Label2.Top + 0.5 * Label2.Height
Label2.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label3_Click()
a = Label3.Left + Label3.Width
b = Label3.Top + 0.5 * Label3.Height
Label3.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label4_Click()
a = Label4.Left + Label4.Width
b = Label4.Top + 0.5 * Label4.Height
Label4.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label5_Click()
c = Label5.Left
d = Label5.Top + 0.5 * Label5.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e2 = b
If e2 = Label2.Top + 0.5 * Label2.Height Then n = n + 1
n = n
Label5.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label6_Click()
c = Label6.Left
d = Label6.Top + 0.5 * Label6.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e1 = b
If e1 = Label1.Top + 0.5 * Label1.Height Then n = n + 1
n = n
Label6.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label7_Click()
c = Label7.Left
d = Label7.Top + 0.5 * Label7.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e4 = b
If e4 = Label4.Top + 0.5 * Label4.Height Then n = n + 1
n = n
Label7.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label8_Click()
c = Label8.Left
d = Label8.Top + 0.5 * Label8.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e3 = b
If e3 = Label3.Top + 0.5 * Label3.Height Then n = n + 1
n = n
Label8.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub CommandButton2_Click()
SlideShowWindows(Index:=1).View.EraseDrawing
Label9.Caption = ""
TextBox1.Text = ""
CommandButton1.Enabled = True
n = 0
Call label '调用过程
End Sub
Private Sub CommandButton1_Click()
If n = 4 Then
Label9.Caption = "你真聪明!"
Else
Label9.Caption = "你再好好想想!"
End If
TextBox1.Text = n * 100 / 4
CommandButton1.Enabled = False
End Sub
'下面是一个子过程
Public Sub label()
Label1.ForeColor = 255
Label2.ForeColor = 255
Label3.ForeColor = 255
Label4.ForeColor = 255
Label5.ForeColor = 255
Label6.ForeColor = 255
Label7.ForeColor = 255
Label8.ForeColor = 255
End Sub
有哪位老师讲解一下
Dim n As Integer
Private Sub CommandButton3_Click()
CommandButton1.Enabled = True
CommandButton2.Enabled = True
CommandButton3.Enabled = False
SlideShowWindows(Index:=1).View.EraseDrawing
Label9.Caption = ""
n = 0
TextBox1.Text = ""
Call label '调用过程
End Sub
Private Sub Label1_Click()
a = Label1.Left + Label1.Width
b = Label1.Top + 0.5 * Label1.Height
Label1.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label2_Click()
a = Label2.Left + Label2.Width
b = Label2.Top + 0.5 * Label2.Height
Label2.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label3_Click()
a = Label3.Left + Label3.Width
b = Label3.Top + 0.5 * Label3.Height
Label3.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label4_Click()
a = Label4.Left + Label4.Width
b = Label4.Top + 0.5 * Label4.Height
Label4.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label5_Click()
c = Label5.Left
d = Label5.Top + 0.5 * Label5.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e2 = b
If e2 = Label2.Top + 0.5 * Label2.Height Then n = n + 1
n = n
Label5.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label6_Click()
c = Label6.Left
d = Label6.Top + 0.5 * Label6.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e1 = b
If e1 = Label1.Top + 0.5 * Label1.Height Then n = n + 1
n = n
Label6.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label7_Click()
c = Label7.Left
d = Label7.Top + 0.5 * Label7.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e4 = b
If e4 = Label4.Top + 0.5 * Label4.Height Then n = n + 1
n = n
Label7.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label8_Click()
c = Label8.Left
d = Label8.Top + 0.5 * Label8.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e3 = b
If e3 = Label3.Top + 0.5 * Label3.Height Then n = n + 1
n = n
Label8.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub CommandButton2_Click()
SlideShowWindows(Index:=1).View.EraseDrawing
Label9.Caption = ""
TextBox1.Text = ""
CommandButton1.Enabled = True
n = 0
Call label '调用过程
End Sub
Private Sub CommandButton1_Click()
If n = 4 Then
Label9.Caption = "你真聪明!"
Else
Label9.Caption = "你再好好想想!"
End If
TextBox1.Text = n * 100 / 4
CommandButton1.Enabled = False
End Sub
'下面是一个子过程
Public Sub label()
Label1.ForeColor = 255
Label2.ForeColor = 255
Label3.ForeColor = 255
Label4.ForeColor = 255
Label5.ForeColor = 255
Label6.ForeColor = 255
Label7.ForeColor = 255
Label8.ForeColor = 255
End Sub
Dim n As Integer
Private Sub CommandButton3_Click()
CommandButton1.Enabled = True
CommandButton2.Enabled = True
CommandButton3.Enabled = False
SlideShowWindows(Index:=1).View.EraseDrawing
Label9.Caption = ""
n = 0
TextBox1.Text = ""
Call label '调用过程
End Sub
Private Sub Label1_Click()
a = Label1.Left + Label1.Width
b = Label1.Top + 0.5 * Label1.Height
Label1.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label2_Click()
a = Label2.Left + Label2.Width
b = Label2.Top + 0.5 * Label2.Height
Label2.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label3_Click()
a = Label3.Left + Label3.Width
b = Label3.Top + 0.5 * Label3.Height
Label3.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label4_Click()
a = Label4.Left + Label4.Width
b = Label4.Top + 0.5 * Label4.Height
Label4.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label5_Click()
c = Label5.Left
d = Label5.Top + 0.5 * Label5.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e2 = b
If e2 = Label2.Top + 0.5 * Label2.Height Then n = n + 1
n = n
Label5.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label6_Click()
c = Label6.Left
d = Label6.Top + 0.5 * Label6.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e1 = b
If e1 = Label1.Top + 0.5 * Label1.Height Then n = n + 1
n = n
Label6.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label7_Click()
c = Label7.Left
d = Label7.Top + 0.5 * Label7.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e4 = b
If e4 = Label4.Top + 0.5 * Label4.Height Then n = n + 1
n = n
Label7.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub Label8_Click()
c = Label8.Left
d = Label8.Top + 0.5 * Label8.Height
SlideShowWindows(Index:=1).View.DrawLine a, b, c, d
e3 = b
If e3 = Label3.Top + 0.5 * Label3.Height Then n = n + 1
n = n
Label8.ForeColor = RGB(0, 0, 255)
End Sub
Private Sub CommandButton2_Click()
SlideShowWindows(Index:=1).View.EraseDrawing
Label9.Caption = ""
TextBox1.Text = ""
CommandButton1.Enabled = True
n = 0
Call label '调用过程
End Sub
Private Sub CommandButton1_Click()
If n = 4 Then
Label9.Caption = "你真聪明!"
Else
Label9.Caption = "你再好好想想!"
End If
TextBox1.Text = n * 100 / 4
CommandButton1.Enabled = False
End Sub
'下面是一个子过程
Public Sub label()
Label1.ForeColor = 255
Label2.ForeColor = 255
Label3.ForeColor = 255
Label4.ForeColor = 255
Label5.ForeColor = 255
Label6.ForeColor = 255
Label7.ForeColor = 255
Label8.ForeColor = 255
End Sub