vb 删除ini文件

vb 删除ini文件,第1张

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 Sub Delete_ini_item(ByVal Appname As String, ByVal Itemname As String)

WritePrivateProfileString Appname, Itemname, 0&, App.Path &inifilename

End Sub

执行删除text1

delete_ini_item "I","Text1"

删除节点及节点中所有值

Public Sub EraseSection(ByVal Section As String, ByVal FileName As String)

WritePrivateProfileString Section, Null, Null, FileName

End Sub

删除指定值Ident

WritePrivateProfileString(Section, Ident, null, FileName)


欢迎分享,转载请注明来源:夏雨云

原文地址:https://www.xiayuyun.com/zonghe/55056.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-02-26
下一篇2023-02-26

发表评论

登录后才能评论

评论列表(0条)

    保存