📄 输入货架位置.frm
字号:
VERSION 5.00
Begin VB.Form Dialog1
BorderStyle = 3 'Fixed Dialog
Caption = "选择货架位置"
ClientHeight = 3195
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 6030
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3195
ScaleWidth = 6030
ShowInTaskbar = 0 'False
Begin VB.ComboBox Combo2
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
DataMember = "1"
DataSource = "4"
Height = 300
ItemData = "输入货架位置.frx":0000
Left = 2880
List = "输入货架位置.frx":0010
TabIndex = 3
Top = 1200
Width = 750
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "输入货架位置.frx":0020
Left = 2880
List = "输入货架位置.frx":0033
TabIndex = 2
Top = 585
Width = 750
End
Begin VB.CommandButton CancelB
Caption = "取消"
Height = 375
Left = 4680
TabIndex = 1
Top = 600
Width = 1215
End
Begin VB.CommandButton OKB
Caption = "确定"
Height = 375
Left = 4680
TabIndex = 0
Top = 120
Width = 1215
End
Begin VB.Label Lab1
Caption = " 货架左右位置(1-5)"
Height = 495
Left = 0
TabIndex = 5
Top = 600
Width = 2655
End
Begin VB.Label Lab2
Caption = " 货架上下位置(1-4)"
Height = 375
Left = 0
TabIndex = 4
Top = 1200
Width = 2535
End
End
Attribute VB_Name = "Dialog1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub CancelB_Click()
sing = False
Unload Me
End Sub
Private Sub Combo1_Change()
If Val(Combo1.Text) > 5 Or Val(Combo1.Text) < 1 Then Combo1.Text = ""
End Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo2.SetFocus
End If
End Sub
Private Sub Combo2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
OKB.SetFocus
End If
End Sub
Private Sub Combo2_Change()
If Val(Combo1.Text) > 4 Or Val(Combo1.Text) < 1 Then Combo2.Text = ""
End Sub
Private Sub Form_Load()
Combo1.Text = ""
End Sub
Private Sub OKB_Click()
Dim i, j As Integer
If Combo1.Text <> "" Then
i = Val(Combo1.Text) '左右
Else
GoTo 2
End If
If Combo2.Text <> "" Then
j = Val(Combo2.Text) '上下
Else
GoTo 2
End If
ind = i + 5 * (j - 1)
sing = True
Unload Me
2
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -