📄 frmfind.frm
字号:
VERSION 5.00
Begin VB.Form FrmFind
BorderStyle = 1 'Fixed Single
Caption = "查找"
ClientHeight = 1185
ClientLeft = 45
ClientTop = 330
ClientWidth = 5865
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1185
ScaleWidth = 5865
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.Frame FraFind
Height = 1095
Left = 120
TabIndex = 0
Top = 0
Width = 5655
Begin VB.TextBox TxtKey
Appearance = 0 'Flat
Height = 270
Left = 840
TabIndex = 8
Top = 240
Width = 3375
End
Begin VB.ComboBox CbTerm
Height = 300
Left = 840
Style = 2 'Dropdown List
TabIndex = 6
Top = 600
Width = 975
End
Begin VB.ComboBox CbType
Height = 300
Left = 2640
Style = 2 'Dropdown List
TabIndex = 2
Top = 600
Width = 1935
End
Begin VB.CheckBox Check1
Caption = "模糊查找"
Height = 255
Left = 4440
TabIndex = 1
Top = 240
Value = 1 'Checked
Width = 1050
End
Begin BarCode.Command CmdFind
Default = -1 'True
Height = 345
Left = 4680
TabIndex = 3
Top = 585
Width = 795
_ExtentX = 1402
_ExtentY = 609
Icon = "FrmFind.frx":0000
Caption = "查找(&F)"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "关键字:"
Height = 180
Left = 120
TabIndex = 7
Top = 285
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "类别:"
Height = 180
Left = 2040
TabIndex = 5
Top = 660
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "条 件:"
Height = 180
Left = 120
TabIndex = 4
Top = 660
Width = 720
End
End
End
Attribute VB_Name = "FrmFind"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub CmdFind_Click()
Dim Str As String
Dim Term As String
If TxtKey.Text = "" Then
TxtKey.SetFocus
Exit Sub
End If
If CbTerm.Text = "名称" Then Term = "Title"
If CbTerm.Text = "产地" Then Term = "Area"
If CbTerm.Text = "条码" Then Term = "BarCode"
Str = "Select * FROM [BarCodeStore] WHERE "
If Check1.Value = 1 Then
Str = Str & Term & " Like '%" & ChkStr(TxtKey.Text) & "%'"
Else
Str = Str & Term & "='" & ChkStr(TxtKey.Text) & "'"
End If
If CbType.ListIndex > 0 Then
Str = Str & " AND ClassID=" & GetTypeID(CbType.Text)
End If
Call GetFindList(FrmMain.Lv1, Str)
Unload Me
End Sub
Private Sub Form_Load()
Me.Icon = FrmMain.Icon
CbTerm.AddItem "名称"
CbTerm.AddItem "产地"
CbTerm.AddItem "条码"
CbTerm.ListIndex = 0
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -