VB 数理统计实用算法
源代码在线查看: 网格_极值f1.frm
VERSION 5.00
Begin VB.Form frmGridRowCol
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "提供网格的列数和行数"
ClientHeight = 1635
ClientLeft = 60
ClientTop = 450
ClientWidth = 5535
LinkTopic = "Form1"
ScaleHeight = 1635
ScaleWidth = 5535
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdExit
Cancel = -1 'True
Caption = "退出"
Height = 375
Left = 2880
TabIndex = 5
ToolTipText = "单击后结束程序运行"
Top = 1080
Width = 975
End
Begin VB.CommandButton cmdOK
Caption = "确定"
Default = -1 'True
Height = 375
Left = 1560
TabIndex = 2
ToolTipText = "在给定列数和行数后单击可以转到录入窗体"
Top = 1080
Width = 975
End
Begin VB.TextBox txtCol
Alignment = 2 'Center
Appearance = 0 'Flat
Height = 375
Left = 480
TabIndex = 0
Top = 360
Width = 1575
End
Begin VB.TextBox txtRow
Alignment = 2 'Center
Appearance = 0 'Flat
Height = 375
Left = 3480
TabIndex = 1
Top = 360
Width = 1575
End
Begin VB.Label lblArray
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "键入网格列数"
ForeColor = &H80000008&
Height = 375
Left = 240
TabIndex = 4
Top = 120
Width = 2175
End
Begin VB.Label lblRowCol
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "键入网格行数"
ForeColor = &H80000008&
Height = 375
Left = 3120
TabIndex = 3
Top = 120
Width = 2295
End
End
Attribute VB_Name = "frmGridRowCol"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'参数窗体
'启动窗体
Option Explicit
'确定
Private Sub cmdOK_Click()
intRow = Val(txtRow) '取得行数
intCol = Val(txtCol) '取得列数
'按行数和列数重新定义数组
ReDim dblArray(1 To intRow, 1 To intCol)
Unload Me '卸载取得行数、列数窗体
frmGridArray.Visible = True '显示录入数据窗体
End Sub
'退出
Private Sub cmdExit_Click()
Unload Me
End
End Sub