正在加载图片...
六、编程题 1.即:书36页1.6题 Private Sub Form Click Labell Caption=VISUAL BASIC End sub 2.即:书上17页例1.1 Private Sub Commandl click Tex1Text="欢迎使用VB6.0 End sub Private Sub Command2 Click Text. Text= End sub Private Sub Command3 Click End sub 3.即:书上106页例49 Private Sub Timer Timer( Label2 Caption= NowO End sub 4.即:书上64页例28 Private Sub Commandl click Dim r As single v As single Const pi=3. 14 r=Va( (nputBox("请输入球体半径","球体半径",0) v=4/3*PI*r^3 Labell Caption= Labell Caption Str(v) End sub 5.即:书上89页3.4题 Private Sub Commandl click Dim score as Integer Dim result as string score Val(TextIText)六、编程题。 1. 即:书上 36 页 1.6 题 Private Sub Form_Click() Label1.Caption = "VISUAL BASIC" End Sub 2. 即:书上 17 页 例 1.1 Private Sub Command1_Click() Text1.Text = "欢迎使用 VB6.0" End Sub Private Sub Command2_Click() Text1.Text = "" End Sub Private Sub Command3_Click() End End Sub 3. 即:书上 106 页例 4.9 Private Sub Timer1_Timer( ) Label2.Caption = Now() End Sub 4. 即:书上 64 页例 2.8 Private Sub Command1_Click() Dim r As Single, v As Single Const PI = 3.14 r = Val(InputBox("请输入球体半径", "球体半径", 0)) v = 4 / 3 * PI * r ^ 3 Label1.Caption = Label1.Caption + Str(v) End Sub 5. 即:书上 89 页 3.4 题 Private Sub Command1_Click() Dim score As Integer Dim result As String score = Val(Text1.Text)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有