当前位置:文档之家› VB6.0上机实验报告

VB6.0上机实验报告

试验报告院(系):课程名称:日期:
代码:
Private sub command1_click() a=val(text1.text)
b=val(text2.text)
c=val(text3.text)
Private sub command1_click() a=val(text1.text)
5. 在程序中声明一个常量,然后改变其值,观察程序执行结果;分别定义全局变量、窗体级全局变量及私有变量,并区别其异同。

代码:
全局变量public x as integer 作用于整个应用程序
窗体模块变量dim x% private x% 作用于窗体模块
Dim a(6) As Double
Public Sub Command1_Click()
Private Sub Command1_Click() Dim a(1 To 20) As Integer
k = 1
For i = 1000 To 3 Step -1
出来。

\
题2 程序运行界面
代码:
Private Sub Command1_Click()
x As Long
Private Sub Command1_Click() Picture1.Left = Picture1.Left + 100 End Sub
Dim A(20) As Integer
Dim max As Integer, min As Integer
Private Sub Command1_Click() Dim i As Integer
Private Sub Timer1_Timer()
Vb程序设计实验报告
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then '如果点的是右键
第21 页共21 页。

相关主题