📄 frmsys.frm
字号:
VERSION 5.00
Begin VB.Form FrmSys
Caption = "系统参数"
ClientHeight = 4410
ClientLeft = 60
ClientTop = 450
ClientWidth = 6225
Icon = "FrmSys.frx":0000
LinkTopic = "Form1"
ScaleHeight = 4410
ScaleWidth = 6225
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame2
Caption = "数据清理"
ForeColor = &H000000FF&
Height = 975
Left = 240
TabIndex = 4
Top = 1200
Width = 5655
Begin VB.CommandButton Command3
Caption = "应用"
Height = 375
Left = 4440
TabIndex = 7
Top = 360
Width = 1095
End
Begin VB.CheckBox Check1
Caption = "歌曲列表"
Height = 255
Left = 120
TabIndex = 5
Top = 360
Width = 1335
End
End
Begin VB.CommandButton Command2
Caption = "返回"
Height = 375
Left = 3960
TabIndex = 3
Top = 3720
Width = 1215
End
Begin VB.Frame Frame1
Caption = "曲库路径"
Height = 975
Left = 120
TabIndex = 0
Top = 120
Width = 5775
Begin VB.CommandButton Command1
Caption = "应用"
Height = 375
Left = 4560
TabIndex = 6
Top = 240
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Left = 120
TabIndex = 1
Top = 240
Width = 4335
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "例如:F:\KTV\SONGLIST"
ForeColor = &H000000FF&
Height = 375
Left = 240
TabIndex = 2
Top = 720
Width = 3855
End
End
End
Attribute VB_Name = "FrmSys"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error Resume Next
If Text1.Text = "" Then
MkDir App.Path & "\song"
Else
MkDir Text1.Text & "\song"
End If
reg = WriteToFile("set", "songPath", Trim(Text1.Text))
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
Dim con As ADODB.Connection
On Error Resume Next
If Check1.Value = 1 Then
If MsgBox("真的要清除歌曲列表中的数据吗?此操作不可恢复!!", vbYesNo, "警告!") = vbYes Then
Set con = New ADODB.Connection
con.ConnectionString = conn
con.Open
con.Execute "delete from songlist"
con.Execute "delete from bianhao"
con.Close
songManger.DataGrid1.Refresh
Else
End If
reg = WriteToFile("set", "num", "0")
If MsgBox("歌曲列表已经被清空!!但视频文件仍然存在,要删除这些视频文件吗?", vbYesNo, "警告!") = vbYes Then
KillFolder songPath
songManger.Adodc1.Refresh
MsgBox "文件已被删除.", vbOKOnly, "提示"
Else
End If
Else
MsgBox "您还没选择表,系统数据不会改变.", vbOKOnly, "提示"
End If
End Sub
Private Sub Form_Load()
Dim s As String
If Dir(strMySystemFile) <> "" Then
s = ReadFromFile("set", "songPath")
If Len(s) <> 0 Then
Text1.Text = s
Else
reg = WriteToFile("set", "songPath", App.Path & "\song")
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -