- 2
- 0
- 约6.94千字
- 约 9页
- 2018-06-09 发布于河南
- 举报
二级真题与解答
二级真实模拟上机操作
1.
t = Text1
Picture1.Print t
Picture1.Visible = True
Text1.Visible = False 事先设置picture1的visible属性为false
2.
Private Sub Form1_Click() Private Sub Form1_DblClick()
Command1.Visible = True Command1.Visible = False
End Sub End Sub
3.
Private Sub Form_Activate()
Frame1.Height = 2500
Frame1.Width = 4000
Text1 = BBB
4
Picture1.BackColor = vbred
Picture1.Print BBB
5.
Dim x As Integer
For i = 1 To 10
x= Int(Rnd * 51 + 100)
If x Mod 3 = 0 Then Picture1.Print x
Next i
6.
Private Sub Text1_Change()
t = Text1.Text
Picture1.Print t
End Sub
7.
TEXT1=FORM2.CAPTION
8.
t = Val(Text1)
m = Int(t)
n = t - m
If n 0.5 Then
Text2 = m
Else
Text2 = Int(Round(t + 0.1))
End If
9.
Dim a(4), min As Integer min = a(1)
a(1) = Text1 8 For i = 1 To 4
a(2) = Text2 5 If a(i) min Then min = a(i)
a(3) = Text3 1 Next i
a(4) = Text4 3 Label1.Caption = min
10.
Dim avg As Integer
a = Val(Text1) avg = Fix(a + b + c) / 3
b = Val(Text2) Label1.Caption = avg
c = Val(Text3)
11.
t = InputBox(AAA)
12.
13.
Private Sub Option1_Click() Private Sub Option2_Click() Private Sub Option3_Click()
Text1.ForeColor = vbRed Text1.ForeColor = vbYellow Text1.ForeColor = vbBlue
End Sub End Sub End Sub
14.
Dim t As Integer (通用) Else
Private Sub Timer1_Timer() Label1.Visible = False
If t = 0 Then t = 0
Label1.Visible = True End If
t = 1 End Sub
(注意timer1的interval 属性值要设置为2000)
15.
(Check1) End If
If Check1.Value = 1 Then (Option1)
Text1.FontBold = True If Option1.Value = True Then
End If Text1.ForeColor = vbRed
(Check2) End If
If Check2.Value =
原创力文档

文档评论(0)