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

📄 main.frm

📁 某公司的电话录音程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form myMain 
   Caption         =   "声音采集"
   ClientHeight    =   1770
   ClientLeft      =   3135
   ClientTop       =   2715
   ClientWidth     =   5355
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   ScaleHeight     =   1770
   ScaleWidth      =   5355
   Begin VB.CommandButton Command2 
      Caption         =   "查询"
      Height          =   495
      Left            =   3120
      TabIndex        =   1
      Top             =   1080
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "移动"
      Height          =   495
      Left            =   960
      TabIndex        =   0
      Top             =   1080
      Width           =   1215
   End
   Begin VB.Menu mFile 
      Caption         =   "文件(&F)"
      Begin VB.Menu mMove 
         Caption         =   "移动(&M)"
      End
      Begin VB.Menu mSearch 
         Caption         =   "记录查询(&S)"
      End
      Begin VB.Menu mExit 
         Caption         =   "退出(&E)"
      End
   End
   Begin VB.Menu mHelp 
      Caption         =   "帮助(&H)"
      Begin VB.Menu mAbout 
         Caption         =   "关于(&A)"
      End
   End
End
Attribute VB_Name = "myMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
fMove.Show vbModal
End Sub

Private Sub Command2_Click()
fSearch.Show vbModal
End Sub

Private Sub Command3_Click()
Dim Sql As String
Dim CString As String
'Dim Cmm As ADODB.Command
Dim Cnn As ADODB.Connection
Dim Rs As ADODB.Recordset
Set Cnn = New ADODB.Connection
Set Rs = New ADODB.Recordset

CString = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=admin;Data Source=F:\!!!\声音采编\file.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False"
With Cnn
.ConnectionString = CString
.Open
End With
Sql = "select * from file"
''''''''''''''''''
Rs.Open Sql, Cnn
''''''''''''''''''
MsgBox Rs.Fields(0) + "   " + Rs.Fields(1) + "    " + Rs.Fields(2) + "        " + Rs.Fields(3)
Rs.Close
Cnn.Close

End Sub

Private Sub Command4_Click()

'MsgBox UCase("AbCdEddddeEEEE")
'Dim msg As String
Dim Sql As String
Dim Rs As ADODB.Recordset ''''''''''''''
'Set rs = New ADODB.Recordset
Sql = "update file set fName='" & "sound3.wav" & "'"
'Call ConnectionDB
If Not mExecuteSql(Sql, Rs) Then
   'MsgBox rs.Fields(0)
   MsgBox "执行失败"
End If
CloseDB
End Sub


Private Sub Command5_Click()
Call TestAndCreate '创建sound和oldsound
End Sub

Private Sub Command6_Click()
Dim file, fs
Dim mDate As String
Set fs = CreateObject("Scripting.FileSystemObject")
Set file = fs.getfile("e:\a\a.txt")
mDate = Format(file.datecreated, "YYYY-MM-DD HH:MM:SS")
MsgBox mDate

End Sub

Private Sub Command7_Click()
Call updateDB
End Sub

Private Sub Command8_Click()
Dim Sql As String
Dim Rs As ADODB.Recordset
Set Rs = New ADODB.Recordset
Sql = "insert into file(fName) values('" & "dkdk.wav" & "')"
MsgBox Sql
If Not mExecuteSql(Sql, Rs) Then MsgBox "数据库有错"
End Sub

Private Sub Command9_Click()
mGettime
End Sub

Private Sub Form_Load()
ChanelNum = 8
NumLong = 7
End Sub

Private Sub Form_Unload(Cancel As Integer)
On Error GoTo E333
Cnn.Close '关闭数据库连结
'卸载所有窗体
Unload fMove
Unload fSearch
Unload fSearchRes
Unload myMain
E333:
End Sub

Private Sub mAbout_Click()
MsgBox "软件主要设计者马晓晨于2003年11月出品", vbOKOnly + vbInformation, "关于"
End Sub

Private Sub mExit_Click()
Unload fMove
Unload fSearch
Unload fSearchRes
Unload Me
End Sub

Private Sub mMove_Click()
fMove.Show
End Sub

Private Sub mSearch_Click()
fSearch.Show
End Sub

⌨️ 快捷键说明

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