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

📄 mainmouble.bas

📁 KTV管理系统,实现了基本的日常操作.程序有不完善之处,请自修升级修改.
💻 BAS
字号:
Attribute VB_Name = "mainMouble"
Public listStr As String * 65400
Public filePath As String
Public conn As String
Public conn1 As String
'winsock参数
Public Sip As String
Public Sport As String
Public Sserver As String

Public Function readTxt() As String '读出文本
Dim listStr As String
Open filePath For Binary As #1 ':用二进制打开文件
Get #1, , listStr ':用Get语句从文件中获取字节
readTxt = listStr
Close #1
End Function
Public Function writeTxt(s As String) '写入文本
Open filePath For Output As #1
Print #1, s
Close #1
End Function
Public Function addTxt(s As String)  '追回文本
Open filePath For Append As #1
Print #1, s
Close #1
End Function
Sub Main()
Dim strFileName As String
conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\data\song.mdb;Persist Security Info=False"
conn1 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\data\main.mdb;Persist Security Info=False"

strFileName = "System.ini"        'set this to the file you want created
strMySystemFile = App.Path & "\" & strFileName
If Dir(strMySystemFile) <> "" Then
Sip = ReadFromFile("set", "ip")
Sport = ReadFromFile("set", "port")
Sserver = ReadFromFile("set", "server")
Else
If MsgBox("请先设置服务器地址!", vbYesNo, "提示") = vbYes Then
frmSet.Show 1
Else
Sip = "127.0.0.1"
Sport = "5000"
Sserver = "zsun"
End If
End If
filePath = App.Path & "\list.txt"
ser = QueryValue(HKEY_CURRENT_USER, appStr, "ser")
                If ser <> "" Then                        '4
                     '校验注册的正确性
                    serNum = GetSerialNumber("c:\")
                    serNum = md5(serNum & "1276")
                    If Left(ser, 16) = serNum Then '注册码相等,读取INI文件参数给全局变量   5
                        Load MDIForm1
                        MDIForm1.Timer3.Enabled = False
                        MDIForm1.Show
                    Else '注册码不相等,非法用户,受限使用
            
                        Call ShouXian
                  
                    End If '5
            Else
                Call ShouXian
            End If '4

End Sub
Private Sub ShouXian() '受限使用模块
MsgBox "还未注册,您可以体验使用!", vbOKOnly, "中旭提醒"
Load MDIForm1
MDIForm1.Timer3.Enabled = True
MDIForm1.Show
End Sub

⌨️ 快捷键说明

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