ax 0 For i 1 To Combo1.ListCount - 1 If ValCombo1.Listi gt max Then imax i max Combo1.Listi ElseIf ValCombo1.Listi lt min Then imin i min Combo1.Listi End If Next i t Combo1.List0 Combo1.List0 Combo1.Listimin Combo1.Listimin t t Combo1.ListCombo1.ListCount - 1 Combo1.ListCombo1.ListCount - 1 Combo1.Listimax Combo1.Listimax tEnd SubE.9Private Sub Form_Click For i 0 To Screen.FontCount - 1 If AscLeftScreen.Fontsi 1 lt 0 Then Picture1.Print Screen.Fontsi Picture2.FontName Screen.Fontsi Picture2.Print quot商丘师范学院quot End If Next iEnd SubE.10Private Type clerk number As String 3 name As String 5 salary As Integer End TypeDim a0 To 4 As clerk nPrivate Sub Command1_ClickIf n gt 5 Then MsgBox quot输入人数超过数组声明的个数quotElse With an .number Text1 .name Text2 .salary Text3 Picture1.Print an.number an.name an.salary Print End With nn1 Text1 quotquot Text2 quotquot Text3 quotquotEnd IfEnd SubPrivate Sub Command2_ClickDim t As clerk i jFor i 0 To n - 1 For j i To n - 1 If ai.salary lt aj 1.salary Then t ai: ai aj 1: aj 1 t End If Next jNext iPicture1.ClsPicture1.Print quot工号 姓名 工资quotFor i 0 To n - 1 Picture1.Print ai.number ai.name ai.salary PrintNext iEnd SubF.1Private Sub Form_Click Dim a1 To 10 amin i For i 1 To 10 ai -IntRnd 101 300 Print ai Next i Call sa amin Print Print quotminquot aminEnd SubSub sb min Dim i min bLBoundb For i LBoundb 1 To UBoundb If bi lt min Then min bi Next iEnd SubF.2Private Sub Command1_Click Dim mm nn mm ValText1 nn ValText2 Picture1.Print mm Tab6 nn Tab12 gcdmm nnEnd SubFunction gcdByVal m ByVal n If m lt n Then t m: m n: n t r m Mod n Do While r ltgt 0 m n: n r: r m Mod n Loop gcd nEnd FunctionF.3Dim xPrivate Sub Command1_ClickPrint quot调用标准函数 Sin 的结果quot SinxEnd SubPrivate Sub Command2_ClickPrint quot调用自定义函数 MySin 的结果quot MySinxEnd SubFunction MySinx As Double Dim i t s tx st i1 Do While Abst gt 0.00001 t -1 t x x / i 1 i 2 sst ii2 Loop MySin sEnd FunctionPrivate Sub Command3_Clickx InputBoxquot输入要计算正弦函数的角度值 xquotx x 3.14 / 180End SubF.4Private Sub Text1_KeyPressKeyAscii As Integer If KeyAscii 13 Then If Not IsNumericText1 Then MsgBox quot输入非数字串,重新输入quot Text1.Text quotquot Text1.SetFocus Else If IsHText1 Then Picture1.Print Text1 quot ★.
上一篇:
倡导绿色,低碳有我!
下一篇:
法律专业开题报告范文