7,788
社区成员
发帖
与我相关
我的任务
分享
Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Public Function SetIniValue(FileName As String, ByVal clsName As String, ByVal key As String, Optional ByVal Value As String = "")
SetIniValue = WritePrivateProfileString(clsName, key, Value, FileName)
End Function
使用:
dim FileName as string
dim str as string
FileName = "link.ini"
str=text1.text & ":" & text2.text
SetIniValue FileName, "Inof", "Link", str