Dim inifile As String = "xjgl.ini"
Dim T_ini As New INIClass( ApplicationPath & inifile)
Dim Provide As String
Dim Persist_Security_Info As String
Dim User As String
Dim pwd As String
Dim Initial_Catalog As String
Dim Data_Source As String
Dim Extended_Properties As String
Dim Initial_File_Name As String
Dim Server_SPN As String
Dim dbconnectstring As String
If T_ini.ExistINIFile Then
Provide = T_ini.IniReadValue("data", "Provider")
Persist_Security_Info = T_ini.IniReadValue("data", "Persist_Security_Info")
User = T_ini.IniReadValue("data", "User")
pwd = T_ini.IniReadValue("data", "pwd")
Initial_Catalog = T_ini.IniReadValue("data", "Initial_Catalog")
Data_Source = T_ini.IniReadValue("data", "Data_Source")
Extended_Properties = T_ini.IniReadValue("data", "Extended_Properties")
Initial_File_Name = T_ini.IniReadValue("data", "Initial_File_Name")
Server_SPN = T_ini.IniReadValue("data", "Server_SPN")
dbc & Provide & ";Persist Security Info=" & Persist_Security_Info & ";User ID=" & User & ";pwd=" & pwd & ";Initial Catalog=" & Initial_Catalog & ";Data Source=" & Data_Source & ";Extended Properties=""" & Extended_Properties & """;Initial File Name=""" & Initial_File_Name & """;Server SPN=""" & Server_SPN & ""
e.ConnectionString = dbconnectstring
Else
MessageBox.Show( "" & inifile & "INI配置文件不存在,请确定", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop)
Syscmd.Project.Exit
End If
AfterOpenProject事件内代码
Forms("窗口_系统登录").Open
编译软件,打开程序,加载splash界面可以,然后就退出了