1.
2.
3.
Private Sub Text2_Change()
'If ? = 1 Then
' Form1.Text3.PasswordChar = ?
Else
' Text3.PasswordChar = ?
End If
'Text3.Text = ?
End Sub
4.
Private Sub Command1_Click()
Dim x As Integer, k As Integer
x = Val(Text1(1).Text)
'For k = 2 To ?
'x = FindMin(Val(Text1(k).Text), ?)
Next
'lblResult.Caption = ?
End Sub
Public Function FindMin(x As Integer, y As Integer)
'If x ? y Then
FindMin = y
Else
FindMin = x
End If
End Function
5.
Private arr(100) As Integer
Private n As Integer
Private Sub Command2_Click()
Open App.Path & "\out5.txt" For Output As #1
Print #1, Text1.Text
Print #1, Text2.Text
Print #1, Text3.Text
Print #1, Text4.Text
Close #1
MsgBox "保存成功!"
End Sub
Private Sub Form_Load()
Open App.Path & "\in5.txt" For Input As #1
n = 0
Do While Not EOF(1)
Input #1, x
n = n + 1
arr(n) = x
Loop
Close #1
End Sub
Private Sub Command1_Click()
'========考生编写程序开始========
???
'==========考生编写程序结束==============
End Sub
6.
7.
8.
Dim a(10) As Integer
Private Sub Command1_Click()
x = a(1)
y = a(1)
For i = 1 To 10
If Option1.Value = True Then
' If a(i) ? x Then
' ?= a(i)
End If
' ElseIf a(i) ? Then
' ?= a(i)
End If
Next
If Option1.Value = True Then
Label2.Caption = x
Else
Label2.Caption = y
End If
End Sub
Private Sub Form_Load()
For i = 1 To 10
a(i) = Int(Rnd * 100)
Next
End Sub
9.
Private Sub Command1_Click()
Call MoveAll
End Sub
Public Sub MoveItem(L1 As ListBox, L2 As ListBox)
' L2.AddItem ?
' L2.AddItem L1.Text
L2.AddItem L1.List(L1.ListIndex)
' L1.RemoveItem ?
L1.RemoveItem L1.ListIndex
End Sub
Public Sub MoveAll()
' For i = 0 To ?
For i = 0 To List1.ListCount - 1
List2.AddItem List1.List(i)
Next
End Sub
Private Sub List1_DblClick()
' Call MoveItem(?)
Call MoveItem(List1, List2)
End Sub
10.
Dim a(7, 7) As Integer
Private Sub Form_Load()
read
End Sub
Public Sub read()
Open App.Path & "\Data5.txt" For Input As #1
Do While Not EOF(1)
For i = 1 To 7
For j = 1 To 7
Input #1, a(i, j)
Next j
Next i
Loop
Close #1
End Sub
Public Sub Save()
Open App.Path & "\out5.txt" For Output As #1
Print #1, lblFirst.Caption, lblSecond.Caption
Close #1
End Sub
Private Sub Command1_Click()
Dim Sum As Long
N = 7
Counter = 0
Sum = 0
'===============考生编写程序开始======================
???
'===============考生编写程序结束======================
Save
End Sub