📄
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form frm_bcc
BorderStyle = 3 'Fixed Dialog
Caption = "表尺寸"
ClientHeight = 2265
ClientLeft = 45
ClientTop = 330
ClientWidth = 3765
HelpContextID = 1012002
Icon = "表尺寸.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2265
ScaleWidth = 3765
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin TabDlg.SSTab SSTab1
Height = 1755
Left = 90
TabIndex = 2
Top = 60
Width = 3615
_ExtentX = 6376
_ExtentY = 3096
_Version = 393216
Style = 1
Tabs = 1
TabsPerRow = 1
TabHeight = 520
TabCaption(0) = "表尺寸"
TabPicture(0) = "表尺寸.frx":1042
Tab(0).ControlEnabled= -1 'True
Tab(0).Control(0)= "Label4"
Tab(0).Control(0).Enabled= 0 'False
Tab(0).Control(1)= "Label3"
Tab(0).Control(1).Enabled= 0 'False
Tab(0).Control(2)= "Label2"
Tab(0).Control(2).Enabled= 0 'False
Tab(0).Control(3)= "Label1"
Tab(0).Control(3).Enabled= 0 'False
Tab(0).Control(4)= "Text2"
Tab(0).Control(4).Enabled= 0 'False
Tab(0).Control(5)= "Text1"
Tab(0).Control(5).Enabled= 0 'False
Tab(0).Control(6)= "UpDown1"
Tab(0).Control(6).Enabled= 0 'False
Tab(0).Control(7)= "UpDown2"
Tab(0).Control(7).Enabled= 0 'False
Tab(0).ControlCount= 8
Begin MSComCtl2.UpDown UpDown2
Height = 255
Left = 3030
TabIndex = 3
Top = 1110
Width = 240
_ExtentX = 423
_ExtentY = 450
_Version = 393216
Value = 1
Max = 702
Enabled = -1 'True
End
Begin MSComCtl2.UpDown UpDown1
Height = 255
Left = 3030
TabIndex = 4
Top = 450
Width = 240
_ExtentX = 423
_ExtentY = 450
_Version = 393216
Value = 1
BuddyControl = "UpDown2"
BuddyDispid = 196612
OrigLeft = 3000
OrigTop = 240
OrigRight = 3240
OrigBottom = 615
Max = 16384
Enabled = -1 'True
End
Begin VB.TextBox Text1
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 300
Left = 780
TabIndex = 6
Top = 420
Width = 2505
End
Begin VB.TextBox Text2
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 300
Left = 780
TabIndex = 5
Top = 1080
Width = 2505
End
Begin VB.Label Label1
Caption = "行数:"
Height = 255
Left = 270
TabIndex = 10
Top = 450
Width = 525
End
Begin VB.Label Label2
Caption = "列数:"
Height = 255
Left = 270
TabIndex = 9
Top = 1140
Width = 495
End
Begin VB.Label Label3
Caption = "(行数有效值: 1 - 16384)"
Height = 195
Left = 690
TabIndex = 8
Top = 750
Width = 2535
End
Begin VB.Label Label4
Caption = "(列数有效值: 1 - 702)"
Height = 225
Left = 720
TabIndex = 7
Top = 1410
Width = 2505
End
End
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "取消(&C)"
Height = 300
Left = 2580
TabIndex = 1
Top = 1890
Width = 1120
End
Begin VB.CommandButton Command1
Caption = "确定(&O)"
Default = -1 'True
Height = 300
Left = 1350
TabIndex = 0
Top = 1890
Width = 1120
End
End
Attribute VB_Name = "frm_bcc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'***********************************************
'* 模 块 名 称 :设置表尺寸
'* 功 能 描 述 :
'* 程序员姓名 :奚俊峰
'* 最后修改人 :奚俊峰
'* 最后修改时间:2002/01/21
'***********************************************
Option Explicit
Private Sub Command1_Click()
If CLng(Text1.Text) > 16384 Or CLng(Text1.Text) < 1 Then
MsgBox "行数超出范围!", vbOKOnly, "提示"
Exit Sub
End If
If CLng(Text2.Text) > 702 Or CLng(Text2.Text) < 1 Then
MsgBox "列数超出范围!", vbOKOnly, "提示"
Exit Sub
End If
MDI_frame.ActiveForm.Cell1.Rows = CInt(Text1.Text)
MDI_frame.ActiveForm.Cell1.Cols = CInt(Text2.Text)
MDI_frame.ActiveForm.Cell1.DoRedrawAll
Unload Me
End Sub
Private Sub command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.HelpContextID = "1012002"
UpDown1.Value = MDI_frame.ActiveForm.Cell1.Rows
UpDown2.Value = CStr(MDI_frame.ActiveForm.Cell1.Cols)
Text1.Text = CStr(UpDown1.Value)
Text2.Text = CStr(UpDown2.Value)
End Sub
Private Sub Text1_Change()
If Len(Text1.Text) > 0 Then
If CLng(Text1.Text) > 16384 Then
UpDown1.Value = 16384
Else
UpDown1.Value = CInt(Text1.Text)
End If
Else
UpDown1.Value = 0
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not ((KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Or KeyAscii = vbKeyBack) Then
KeyAscii = 0
End If
End Sub
Private Sub Text2_Change()
If Len(Text2.Text) > 0 Then
If CLng(Text2.Text) > 702 Then
UpDown2.Value = 702
Else
UpDown2.Value = CInt(Text2.Text)
End If
Else
UpDown2.Value = 0
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If Not ((KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Or KeyAscii = vbKeyBack) Then
KeyAscii = 0
End If
End Sub
Private Sub UpDown1_Change()
Text1.Text = CStr(UpDown1.Value)
End Sub
Private Sub UpDown2_Change()
Text2.Text = CStr(UpDown2.Value)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -