📄 frmquantly.frm
字号:
VERSION 5.00
Begin VB.Form frmQuantly
BorderStyle = 3 'Fixed Dialog
Caption = "物品数量"
ClientHeight = 1395
ClientLeft = 45
ClientTop = 330
ClientWidth = 4605
Icon = "frmQuantly.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1395
ScaleWidth = 4605
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.TextBox txtSl
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 480
Left = 90
MaxLength = 5
TabIndex = 0
Text = "1"
Top = 585
Width = 4320
End
End
Attribute VB_Name = "frmQuantly"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdSure_Click()
If Val(txtSl.Text) > 0 Then
SureQuantly = True
sSL = Val(txtSl.Text)
Unload Me
Else
MsgBox "请输入购买数量? ", vbInformation
txtSl.SetFocus
End If
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then
Unload Me
End If
End Sub
Private Sub Form_Load()
SureQuantly = False
If sSL = 0 Then
txtSl = 1
Else
txtSl.Text = sSL
End If
sLabel.Caption = frmCustomerForm.Grid1.Text
End Sub
Private Sub txtSl_Change()
sSL = Val(txtSl.Text)
End Sub
Private Sub txtSl_GotFocus()
SetItFocus txtSl
End Sub
Private Sub txtSl_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Val(txtSl.Text) > 0 Then
SureQuantly = True
sSL = Val(txtSl.Text)
' 保存记录
Unload Me
Exit Sub
End If
If KeyAscii = 8 Then '退格键
Exit Sub
End If
If KeyAscii < 48 Or KeyAscii > 57 Then '只允许0-9输入
KeyAscii = 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -