txtInipath.Text就是完整的ini文件所在的路径 格式如上
txtsection.Text就是section的名字也就是“[]”内的东西 如你举例子中的XXXXX
“keyword”就是你里面的version、name、desc等
txtValue.Text就是你也写的0.2 xxxx yyyyy
这么说有点累 你家我的QQ 26969867 我给你一个我写的程序 专门搞ini的还有不懂的可以语音
调用:dim exe = readstring
shell exe
过程:
Public Function ReadString(Section As String, key As String, Size As Long) As String
Dim ReturnStr As String
Dim ReturnLng As Long
ReadString = vbNullString
If NoIniFile() Then
Exit Function
End If
ReturnStr = Space(Size)
ReturnLng = GetPrivateProfileString(Section, key, vbNullString, ReturnStr, Size, IniFileName)
ReadString = Left(ReturnStr, ReturnLng)
End Function
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)