?? frmsearch.frm
字號:
VERSION 5.00
Begin VB.Form frmSearch
BorderStyle = 3 'Fixed Dialog
Caption = "查找客戶"
ClientHeight = 2370
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 5520
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2370
ScaleWidth = 5520
ShowInTaskbar = 0 'False
Begin VB.Frame Frame1
Caption = "查找客戶"
Height = 1335
Left = 480
TabIndex = 2
Top = 240
Width = 4695
Begin VB.ComboBox cboType
Height = 300
ItemData = "frmSearch.frx":0000
Left = 1680
List = "frmSearch.frx":0002
Style = 2 'Dropdown List
TabIndex = 4
Top = 750
Width = 1815
End
Begin VB.TextBox txtName
Height = 300
Left = 1680
TabIndex = 3
Top = 300
Width = 1815
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "客戶類型"
Height = 180
Left = 600
TabIndex = 6
Top = 840
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "姓名"
Height = 180
Left = 600
TabIndex = 5
Top = 360
Width = 360
End
End
Begin VB.CommandButton CancelButton
Caption = "取消"
Height = 375
Left = 3840
TabIndex = 1
Top = 1800
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "確定"
Height = 375
Left = 2520
TabIndex = 0
Top = 1800
Width = 1215
End
End
Attribute VB_Name = "frmSearch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private OK As Boolean '確定用戶按了OK還是CANCEL按鈕
Private mvarSearchName As String '查找的客戶名稱
Private mvarTypeId As Long '客戶類型ID
'查找的客戶名稱
Public Property Get SearchName() As String
SearchName = mvarSearchName
End Property
'客戶類型ID
Public Property Get TypeId() As Long
TypeId = mvarTypeId
End Property
Private Sub CancelButton_Click()
OK = False
Me.Hide
End Sub
Private Sub Form_Load()
'將所有客戶類型添加到組合框中
AllClientsTypeToCombo cboType
cboType.AddItem "全部類型", 0
cboType.ItemData(0) = 0
cboType.ListIndex = 0
End Sub
'顯示查找對話框
Public Function RetriveSearch(Optional nTypeID As Long = -1) As Boolean
Me.Show vbModal
If OK = False Then Exit Function
RetriveSearch = True
Unload Me
End Function
Private Sub OKButton_Click()
OK = True
mvarSearchName = txtName.Text
mvarTypeId = cboType.ItemData(cboType.ListIndex)
Me.Hide
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -