numform.frm
来自「一套VB完整的灯具销售管理系统设计」· FRM 代码 · 共 129 行
FRM
129 行
VERSION 5.00
Object = "{FE0065C0-1B7B-11CF-9D53-00AA003C9CB6}#1.0#0"; "COMCT232.OCX"
Begin VB.Form NumForm
BackColor = &H00400040&
BorderStyle = 3 'Fixed Dialog
ClientHeight = 1185
ClientLeft = 45
ClientTop = 45
ClientWidth = 4920
ControlBox = 0 'False
ForeColor = &H00FFFF80&
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1185
ScaleWidth = 4920
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin ComCtl2.UpDown UpDown1
Height = 270
Left = 2941
TabIndex = 4
Top = 480
Width = 240
_ExtentX = 423
_ExtentY = 476
_Version = 327680
Value = 50
BuddyControl = "Text1"
BuddyDispid = 196612
OrigLeft = 3300
OrigTop = 465
OrigRight = 3540
OrigBottom = 720
Increment = 5
Max = 10000
Min = 1
SyncBuddy = -1 'True
Wrap = -1 'True
BuddyProperty = 0
Enabled = -1 'True
End
Begin VB.CommandButton CloseForm
Cancel = -1 'True
Caption = "放弃"
Height = 345
Left = 3660
TabIndex = 3
Top = 645
Width = 930
End
Begin VB.CommandButton Sure
Caption = "确认"
Default = -1 'True
Enabled = 0 'False
Height = 345
Left = 3660
TabIndex = 2
Top = 240
Width = 930
End
Begin VB.TextBox Text1
Height = 270
Left = 2130
TabIndex = 0
Top = 480
Width = 810
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "请输入该产品的数量:"
ForeColor = &H00FFFF80&
Height = 180
Left = 255
TabIndex = 1
Top = 510
Width = 1800
End
End
Attribute VB_Name = "NumForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CloseForm_Click()
Unload Me
End Sub
Private Sub Form_Load()
cpselect.Numtext.Text = ""
End Sub
Private Sub Sure_Click()
cpselect.Numtext.Text = Text1.Text
Unload Me
End Sub
Private Sub Text1_Change()
If Val(Text1.Text) > 0 Then
Sure.Enabled = True
Else
Sure.Enabled = False
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Sure.Enabled = True Then
Sure.SetFocus
Else
Exit Sub
End If
End If
If KeyAscii = 8 Then
If Val(Trim(Text1.Text)) = 0 Then
KeyAscii = 0
Else
Text1.Text = Left(Text1.Text, (Len(Text1.Text) - 1))
Text1.SelStart = Len(Text1.Text)
End If
End If
If KeyAscii < 47 Or KeyAscii > 58 Then
KeyAscii = 0
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?