📄 输入货物名称和数量.frm
字号:
VERSION 5.00
Begin VB.Form Dialog2
BorderStyle = 3 'Fixed Dialog
Caption = "请输入货物名称和数量"
ClientHeight = 3435
ClientLeft = 4350
ClientTop = 4560
ClientWidth = 4485
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3435
ScaleWidth = 4485
ShowInTaskbar = 0 'False
Begin VB.TextBox Text2
Height = 375
Left = 2040
TabIndex = 3
Top = 1680
Width = 1575
End
Begin VB.TextBox Text1
Height = 375
Left = 2040
TabIndex = 2
Top = 960
Width = 1575
End
Begin VB.CommandButton CancelButton
Caption = "取消"
Height = 375
Left = 2520
TabIndex = 1
Top = 2520
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "确定"
Height = 375
Left = 480
TabIndex = 0
Top = 2520
Width = 1215
End
Begin VB.Label Label4
Caption = "请输入现在托盘上的"
Height = 375
Left = 240
TabIndex = 6
Top = 360
Width = 1695
End
Begin VB.Label Label2
Caption = " 货物数量"
Height = 375
Index = 0
Left = 720
TabIndex = 5
Top = 1680
Width = 855
End
Begin VB.Label Label1
Caption = " 货物名称"
Height = 375
Index = 0
Left = 120
TabIndex = 4
Top = 1080
Width = 1575
End
End
Attribute VB_Name = "Dialog2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub CancelButton_Click()
Unload Me
End Sub
Private Sub Form_Load()
Form_main.Adodc1.RecordSource = "select * from 库存 where 位置=" & 0
Form_main.Adodc1.Refresh
Text1.Text = Form_main.Adodc1.Recordset.Fields("名称")
Text2.Text = Form_main.Adodc1.Recordset.Fields("数量")
sing = False
End Sub
Private Sub OKButton_Click()
name1 = Trim(Text1.Text)
number1 = Val(Text2.Text)
Unload Me
sing = True
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
OKButton.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -