⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 通信录
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   270
      Left            =   4800
      TabIndex        =   10
      Top             =   90
      Width           =   1065
   End
   Begin VB.Timer Timer1 
      Interval        =   1500
      Left            =   420
      Top             =   4080
   End
   Begin VB.Label Label3 
      BackColor       =   &H80000013&
      Caption         =   "住宅号码:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   210
      TabIndex        =   9
      Top             =   996
      Width           =   1365
   End
   Begin VB.Label Label10 
      BackColor       =   &H80000013&
      Caption         =   "备  注  :"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   210
      TabIndex        =   8
      Top             =   3720
      Width           =   1365
   End
   Begin VB.Label Label9 
      BackColor       =   &H80000013&
      Caption         =   "关系类型:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   3330
      TabIndex        =   7
      Top             =   90
      Width           =   1395
   End
   Begin VB.Label Label8 
      BackColor       =   &H80000013&
      Caption         =   "QQ  号码:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   210
      TabIndex        =   6
      Top             =   3261
      Width           =   1365
   End
   Begin VB.Label Label7 
      BackColor       =   &H80000013&
      Caption         =   "E - MAIL:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   210
      TabIndex        =   5
      Top             =   2808
      Width           =   1365
   End
   Begin VB.Label Label6 
      BackColor       =   &H80000013&
      Caption         =   "邮政编码:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   210
      TabIndex        =   4
      Top             =   2355
      Width           =   1365
   End
   Begin VB.Label Label5 
      BackColor       =   &H80000013&
      Caption         =   "联系地址:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   210
      TabIndex        =   3
      Top             =   1902
      Width           =   1365
   End
   Begin VB.Label Label4 
      BackColor       =   &H80000013&
      Caption         =   "手机号码:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   210
      TabIndex        =   2
      Top             =   1449
      Width           =   1365
   End
   Begin VB.Label Label2 
      BackColor       =   &H80000013&
      Caption         =   "公司号码:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   210
      TabIndex        =   1
      Top             =   543
      Width           =   1365
   End
   Begin VB.Label Label1 
      BackColor       =   &H80000013&
      Caption         =   "姓  名  :"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   210
      TabIndex        =   0
      Top             =   90
      Width           =   1365
   End
   Begin VB.Menu About 
      Caption         =   "关于程序"
   End
   Begin VB.Menu Exit 
      Caption         =   "退出程序"
      NegotiatePosition=   1  'Left
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub About_Click()
Load frmAbout  '显示帮助
frmAbout.Show
End Sub

Private Sub Command1_Click()

On Error GoTo Commanderror

Data1.Recordset.AddNew   '写入记录
Text1.Enabled = True     '等待输入新记录
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Text6.Enabled = True
Text7.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text10.Enabled = True
Commanderror:
If Err.Number <> 0 Then  '出错处理
MsgBox Err.Description
End If

End Sub
Private Sub Command2_Click()
Text1.Enabled = True     '修改记录
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Text6.Enabled = True
Text7.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text10.Enabled = True
End Sub
Private Sub Command3_Click()
Data1.Recordset.Delete    '删除当前记录
Data1.Recordset.MoveNext  '移动到下一记录
End Sub
Private Sub Command4_Click() '查询
oldmard = Data1.Recordset.Bookmark
msg = Trim(InputBox("请按查找方式输入查找内容:", "查询记录", "", 3600, 3600))
msg1 = Combo1.Text + "='"
msg2 = msg1 + msg + "'"
Data1.Recordset.FindFirst msg2
If Data1.Recordset.NoMatch Then
  MsgBox "没有符合条件的记录", vbOKOnly + 48, "查询记录"
End If
End Sub

Private Sub Command6_Click()  '返回到首记录
If Data1.Recordset.EOF = True And Data1.Recordset.BOF = True Then Command6.Enabled = False Else Data1.Recordset.MoveFirst
If Data1.Recordset.EOF = False Then Command8.Enabled = True
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
End Sub
Private Sub Command7_Click()  '移动到上一条记录
If Data1.Recordset.BOF = True Then Command7.Enabled = False Else Data1.Recordset.MovePrevious
If Data1.Recordset.EOF = False Then Command8.Enabled = True
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
End Sub
Private Sub Command8_Click()  '移动到下一条记录
If Data1.Recordset.EOF = True Then Command8.Enabled = False Else Data1.Recordset.MoveNext
If Data1.Recordset.BOF = False Then Command7.Enabled = True
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
End Sub
Private Sub Command9_Click()  '返回到尾记录
Data1.Recordset.MoveLast
If Data1.Recordset.BOF = False Then Command7.Enabled = True
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
End Sub
Private Sub Exit_Click()
Unload Me   '退出
End Sub

Private Sub Form_Load()
'查找方式选择
Combo1.AddItem "姓名"
Combo1.AddItem "住宅号码"
Combo1.AddItem "手机号码"
Combo1.AddItem "QQ号码"
End Sub

Private Sub Timer1_Timer()  '当为空记录时,各按钮的状态
If Data1.Recordset.BOF = True And Data1.Recordset.EOF = True Then
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
Else
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command6.Enabled = True
Command7.Enabled = True
Command8.Enabled = True
Command9.Enabled = True
End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -