📄 phonebook.frm
字号:
Locked = -1 'True
MaxLength = 50
TabIndex = 38
Top = 4200
Width = 3735
End
Begin VB.TextBox txtPers
Height = 285
Index = 9
Left = 120
Locked = -1 'True
MaxLength = 50
TabIndex = 37
Top = 3600
Width = 3735
End
Begin VB.TextBox txtPers
Height = 285
Index = 8
Left = 2040
Locked = -1 'True
MaxLength = 50
TabIndex = 36
Top = 3000
Width = 1815
End
Begin VB.TextBox txtPers
Height = 285
Index = 7
Left = 120
Locked = -1 'True
MaxLength = 50
TabIndex = 35
Top = 3000
Width = 1815
End
Begin VB.TextBox txtPers
Height = 285
Index = 6
Left = 2040
Locked = -1 'True
MaxLength = 50
TabIndex = 34
Top = 2400
Width = 1815
End
Begin VB.TextBox txtPers
Height = 285
Index = 5
Left = 120
Locked = -1 'True
MaxLength = 50
TabIndex = 33
Top = 2400
Width = 1815
End
Begin VB.TextBox txtPers
Height = 285
Index = 4
Left = 2040
Locked = -1 'True
MaxLength = 50
TabIndex = 32
Top = 1800
Width = 1815
End
Begin VB.TextBox txtPers
Height = 285
Index = 3
Left = 120
Locked = -1 'True
MaxLength = 50
TabIndex = 31
Top = 1800
Width = 1815
End
Begin VB.TextBox txtPers
Height = 285
Index = 1
Left = 2040
Locked = -1 'True
MaxLength = 50
TabIndex = 30
Top = 600
Width = 1815
End
Begin VB.TextBox txtPers
Height = 285
Index = 0
Left = 120
Locked = -1 'True
MaxLength = 50
TabIndex = 29
Top = 600
Width = 1815
End
Begin VB.CommandButton cmdMove
Caption = "I<"
Enabled = 0 'False
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Index = 0
Left = 120
TabIndex = 28
ToolTipText = "Move to the first post"
Top = 4560
Width = 635
End
Begin VB.CommandButton cmdMove
Caption = ">"
Enabled = 0 'False
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Index = 1
Left = 720
TabIndex = 27
ToolTipText = "Move to the next post"
Top = 4560
Width = 635
End
Begin VB.CommandButton cmdMove
Caption = "<"
Enabled = 0 'False
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Index = 2
Left = 1320
TabIndex = 26
ToolTipText = "Move to the previous post"
Top = 4560
Width = 635
End
Begin VB.CommandButton cmdMove
Caption = ">I"
Enabled = 0 'False
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Index = 3
Left = 1920
TabIndex = 25
ToolTipText = "Move to the last post"
Top = 4560
Width = 635
End
Begin VB.CommandButton cmdWebEmail
Height = 540
Index = 1
Left = 3360
Picture = "PhoneBook.frx":049A
Style = 1 'Graphical
TabIndex = 24
ToolTipText = "Go to the person in this post webpage"
Top = 4560
Width = 615
End
Begin VB.CommandButton cmdWebEmail
Height = 540
Index = 0
Left = 2640
Picture = "PhoneBook.frx":08DC
Style = 1 'Graphical
TabIndex = 23
ToolTipText = "Send a mail to the person in this post"
Top = 4560
Width = 615
End
Begin VB.TextBox txtPers
Height = 285
Index = 2
Left = 120
Locked = -1 'True
MaxLength = 50
TabIndex = 22
Top = 1200
Width = 3735
End
Begin VB.Image Image1
Appearance = 0 'Flat
BorderStyle = 1 'Fixed Single
Height = 3630
Left = -74760
Top = 480
Width = 3585
End
Begin VB.Label lblPers
Caption = "主页"
Height = 255
Index = 9
Left = 120
TabIndex = 52
Top = 3960
Width = 2175
End
Begin VB.Label lblPers
Caption = "电子邮件"
Height = 255
Index = 8
Left = 120
TabIndex = 51
Top = 3360
Width = 1335
End
Begin VB.Label lblPers
Caption = "手机"
Height = 255
Index = 7
Left = 2040
TabIndex = 50
Top = 2760
Width = 1335
End
Begin VB.Label lblPers
Caption = "电话"
Height = 255
Index = 6
Left = 120
TabIndex = 49
Top = 2760
Width = 1335
End
Begin VB.Label lblPers
Caption = "国家"
Height = 255
Index = 5
Left = 2040
TabIndex = 48
Top = 2160
Width = 1335
End
Begin VB.Label lblPers
Caption = "城市"
Height = 255
Index = 4
Left = 120
TabIndex = 47
Top = 2160
Width = 1335
End
Begin VB.Label lblPers
Caption = "邮编"
Height = 255
Index = 3
Left = 2040
TabIndex = 46
Top = 1560
Width = 1335
End
Begin VB.Label lblPers
Caption = "地址"
Height = 255
Index = 2
Left = 120
TabIndex = 45
Top = 1560
Width = 1335
End
Begin VB.Label lblPers
Caption = "名"
Height = 255
Index = 1
Left = 2040
TabIndex = 44
Top = 360
Width = 1335
End
Begin VB.Label lblPers
Caption = "姓"
Height = 255
Index = 0
Left = 120
TabIndex = 43
Top = 360
Width = 1335
End
Begin VB.Label lblPers
Caption = "公司"
Height = 255
Index = 10
Left = 120
TabIndex = 42
Top = 960
Width = 1335
End
End
Begin VB.Line Line1
X1 = 0
X2 = 6840
Y1 = 0
Y2 = 0
End
Begin VB.Menu mnuFile
Caption = "&文件"
Begin VB.Menu mnuOpenAdressRegister
Caption = "打开地址本"
Shortcut = ^O
End
Begin VB.Menu mnuCreateAdressRegister
Caption = "创建新的地址本"
Shortcut = ^C
End
Begin VB.Menu mnuBackup
Caption = "备份地址本"
Enabled = 0 'False
Shortcut = ^B
End
Begin VB.Menu mnuRestoreBackup
Caption = "恢复地址本"
Shortcut = ^R
End
Begin VB.Menu mnuExit
Caption = "退出"
Shortcut = ^X
End
End
Begin VB.Menu mnuAbout
Caption = "关于"
Begin VB.Menu mnuHelp
Caption = "&Help"
Shortcut = {F1}
End
Begin VB.Menu mnuMailDeveloper
Caption = "&Mail Developer"
End
Begin VB.Menu mnuWebDeveloper
Caption = "&Developers Webpage"
End
End
End
Attribute VB_Name = "PhoneBook"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private objRs As ADODB.Recordset 'The recordset object
Private conString As String 'The string to use in objRs.ActiveConnection (what database to open)
Private bolEdit As Boolean 'Tells what kind of locktype to use in recordset
Private WhereString As String 'What to get in the recordset (used in the search function)
Private WhereVal As String 'What column to use in the wherestring
Private bolSearch As Boolean 'Tells if you are searching or not (to be used if the db is empty)
Private AdressRegisterPath As String 'Tells the path to the choosen Adressregister
Private CD1 As New cmDlg
Private CD12 As New cmDlg
Private CDCreateOpen2 As New cmDlg
'***Open Database***'
Private Sub OpenDatabase()
mnuBackup.Enabled = True
optEditMode(0).Enabled = True
optEditMode(1).Enabled = True
cmdSearch.Enabled = True
cmdMove(0).Enabled = True
cmdMove(1).Enabled = True
cmdMove(2).Enabled = True
cmdMove(3).Enabled = True
conString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & AdressRegisterPath & _
";Persist Security Info=False"
Set objRs = New ADODB.Recordset
OpenRs
End Sub
'***Show the person in the current record***'
Private Sub showCurrentRec()
Dim I As Integer
With objRs 'Fill the textboxes with the record
For I = 1 To .Fields.Count - 1
txtPers(I - 1).Text = .Fields(I) & ""
Next I
End With
On Error GoTo errHandler 'In case the photopath is wrong
Image1.Picture = LoadPicture(txtPers(11).Text) 'Set the picture = the photopath
errHandler:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -