<VB数理统计实用算法>书中的算法源程序
源代码在线查看: 数据文件_录入f1.frm
VERSION 5.00
Begin VB.Form frmInputRowCol
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "提供列数和行数"
ClientHeight = 1710
ClientLeft = 60
ClientTop = 450
ClientWidth = 5520
LinkTopic = "Form1"
ScaleHeight = 1710
ScaleWidth = 5520
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdExit
Caption = "退 出"
Height = 375
Left = 4080
TabIndex = 5
ToolTipText = "结束程序运行"
Top = 1200
Width = 1215
End
Begin VB.CommandButton cmdOK
Caption = "确 定"
Height = 375
Left = 2640
TabIndex = 4
ToolTipText = "按列数和行数,或转到文本框录入,或转到网格录入"
Top = 1200
Width = 1215
End
Begin VB.TextBox txtCol
Alignment = 2 'Center
Appearance = 0 'Flat
Height = 375
Left = 960
TabIndex = 0
Top = 720
Width = 735
End
Begin VB.TextBox txtRow
Alignment = 2 'Center
Appearance = 0 'Flat
Height = 375
Left = 3480
TabIndex = 3
Top = 720
Width = 855
End
Begin VB.Label Label1
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "(不计图题、行标和列标)"
ForeColor = &H80000008&
Height = 255
Left = 2760
TabIndex = 6
Top = 360
Width = 2175
End
Begin VB.Label lblCol
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "在下面的文本框键入列数"
ForeColor = &H80000008&
Height = 255
Left = 120
TabIndex = 2
Top = 120
Width = 2535
End
Begin VB.Label lblRow
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "在下面的文本框键入行数"
ForeColor = &H80000008&
Height = 255
Left = 2520
TabIndex = 1
Top = 120
Width = 2655
End
End
Attribute VB_Name = "frmInputRowCol"
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)
Unload Me '卸载当前窗体
intRowAll = intRow + 3 '数据行数、总行数、列数各占一行
If blnTitle Then intRowAll = intRowAll + 1 '有标题
If blnRowLabel Then intRowAll = intRowAll + intRow '有行标
If blnColLabel Then intRowAll = intRowAll + 1 '有列标
If intRowAll > 36 Or intCol > 15 Then
frmGridArray.Visible = True '显示网格录入数据窗体
Else
frmArray.Visible = True '显示文本框录入数据窗体
End If
End Sub
'退出
Private Sub cmdExit_Click()
Unload Me
End
End Sub