正在加载图片...
(1) String*1 (2)ChrS( KeyAscii -32)(3)" *33(4)Unload Me 5)1(6)P*I(7)fact (8(9)Sum+fact(1) (10)True(1) Fore Color(12)隶书 六、编程题。 1. Private Sub Commandl Click() Dim a As Single, b As Single, c As Single, max As Single a= Val(TextI Text) b= val(Text2 Text) c=Val(Text3 Text) Ifa> b Then max= a Else max= b End lf Ifc> max Then maX-c End lf Label4 Caption="最大的数是:"+Str(max) End sub 2. Private Sub Form Load( HScroll max=255 HScrolll. Min=o HScrolll. smallChange=1 HScrolll. Large Change=20 HScrolll. value= 50 End sub Private Sub HScroll Change( TextI Text= Str(HScrolll Value) End Sub 3. Private Sub Command1 Click Dim length As Single, width As Single Dim c As single length=val( InputBox("请输入长方形的长","数据输入") width=val( nput Box("请输入长方形的宽”,"数据输入") c=2*(length width Labell Caption=Labell Caption+ Str(c)(1)String*1 (2 ) Chr$(KeyAscii − 32) (3)”*” (4) Unload Me (5) 1 (6) P*I (7) fact (8) 6 (9) Sum+fact( i ) (10) True (11) ForeColor (12) “隶书” 六、 编程题。 1.Private Sub Command1_Click( ) Dim a As Single, b As Single, c As Single, max As Single a = Val(Text1.Text) b = Val(Text2.Text) c = Val(Text3.Text) If a > b Then max = a Else max = b End If If c > max Then max = c End If Label4.Caption = "最大的数是:" + Str(max) End Sub 2.Private Sub Form_Load( ) HScroll1.Max = 255 HScroll1.Min = 0 HScroll1.SmallChange = 1 HScroll1.LargeChange = 20 HScroll1.Value = 50 End Sub Private Sub HScroll1_Change( ) Text1.Text = Str(HScroll1.Value) End Sub 3. Private Sub Command1_Click() Dim length As Single, width As Single Dim c As Single length = Val(InputBox("请输入长方形的长", "数据输入")) width = Val(InputBox("请输入长方形的宽", "数据输入")) c = 2 * (length + width) Label1.Caption = Label1.Caption + Str(c)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有