vb高手麻烦了,一个VB模块MODULE中的代码

来源:百度知道 编辑:UC知道 时间:2024/05/18 05:45:50
Public nowconnectstring As String

Public operatetype As Integer
Public Declare Function GetPrivateProfileString Lib "Kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, lpKeyName As Any, ByVal lpDefault As String, ByVal lpRetunedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Public Declare Function WritePrivateProfileString Lib "Kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, lpKeyName As Any, ByVal lpAdd As String, ByVal lpFileName As String) As Boolean
Public pzhm As Variant
Public userqx As Variant
Public username As Variant
Public starttime As String
Public endtime As String

Public server As String
Public loginname As String
Public database As String
Public pass As String
Public path As String
Public wenjm As String

Public Sub storewjm(filename As String)

WritePrivateProfileString ,GetPrivateProfileString函数是微软提供的操作 *.ini文件的API函数。

估计是采用ini文件保存软件设置的模块吧,
不过现在这种做法不太推荐了,都是采用xml文件啦