📄 frmwallheight.frm
字号:
VERSION 5.00
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form frmWallHeight
BorderStyle = 3 'Fixed Dialog
Caption = "输入墙体厚度"
ClientHeight = 1755
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 2940
Icon = "frmWallHeight.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1755
ScaleWidth = 2940
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin MSMask.MaskEdBox txtWallThickness
Height = 345
Left = 195
TabIndex = 0
Top = 495
Width = 2130
_ExtentX = 3757
_ExtentY = 609
_Version = 393216
PromptChar = "_"
End
Begin VB.CommandButton CancelButton
Cancel = -1 'True
Caption = "取消(&C)"
Height = 405
Left = 1500
TabIndex = 2
Top = 1110
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "确定(&O)"
Default = -1 'True
Height = 405
Left = 165
TabIndex = 1
Top = 1110
Width = 1215
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "输入墙体厚度(单位:米)"
Height = 180
Left = 210
TabIndex = 3
Top = 195
Width = 1980
End
End
Attribute VB_Name = "frmWallHeight"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mCanceled As Boolean
Dim mWallThickness As Double
Private Sub CancelButton_Click()
mCanceled = True
Unload Me
End Sub
Private Sub Form_Load()
On Error Resume Next
mCanceled = True
txtWallThickness.Text = "0"
End Sub
Private Sub OKButton_Click()
On Error Resume Next
If Not IsNumeric(txtWallThickness.Text) Then
MsgBox "请输入数据!", vbOKOnly + vbInformation, Me.Caption
txtWallThickness.SetFocus
Exit Sub
End If
mWallThickness = CDbl(txtWallThickness.Text)
If mWallThickness <= 0 Then
MsgBox "墙体厚度必须>0!", vbOKOnly + vbInformation, Me.Caption
txtWallThickness.SetFocus
Exit Sub
End If
mCanceled = False
Unload Me
End Sub
Public Property Get IsCanceled() As Boolean
IsCanceled = mCanceled
End Property
'返回Height
Public Property Get WallThickness() As Double
WallThickness = mWallThickness
End Property
Private Sub txtWallThickness_GotFocus()
txtWallThickness.SelStart = 0
txtWallThickness.SelLength = Len(txtWallThickness.Text)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -