Hi again, please help me downloading this article 'A Class for Easy INI File Handling' or send me the file "1772_CDS_CIni.cls" Many, many thanks !!!
Replyhttp://www.codeguru.com/vb/controls/vb_activex/article.php/c3485/1772_CDS_CIni.cls is a null text file! Pls, help me to get it! Thanks a lot
ReplyOriginally posted by: Daniel Bruce
Many thanks, you have saved me hours of work.
ReplyOriginally posted by: Elangovan.D
It's really very very Nice. TanK'S
Originally posted by: Ramin
It was really helpfull. I had my own class but yours is shorter and abvious and also works perfect!!! Thank you.
ReplyOriginally posted by: ARS
lRet = m_IniFile.WriteValue(LpSectionName, vbNullString, vbNullString)
Delete a Key
lRet = m_IniFile.WriteValue(LpSectionName.Text, LpKeyName, vbNullString)
You can add the following to the CDI Class Module to Delete a Key or Delete a Section from the Ini File.
Delete a section
Originally posted by: Mauricio
I need to know pls how can I modify a name, key or value
Pls , i�m new on this
THNX
Originally posted by: uday j yadurkar
thanks.
Its very nice code.
this code is very useful to me.
uday
Originally posted by: Paul Adams
Here is some code that some might find useful. Add it to the INI Class module.
Public Function DeleteKey(psSection As String, psKey As String) As Boolean
' get out if we don't have a filename ....
If Not HaveFileName Then DeleteKey = False: Exit Function
' Return value
Dim lRet As Long
' Try to write the value
lRet = WritePrivateProfileString(psSection, psKey, 0&, m_FileName)
' if lRet = 0 an error has occured
If lRet = 0 Then GetTheLastError
DeleteKey = CBool(lRet)
End Function
Public Function DeleteSection(psSection As String) As Boolean
' get out if we don't have a filename ....
If Not HaveFileName Then DeleteSection = False: Exit Function
' Return value
Dim lRet As Long
' Try to write the value
lRet = WritePrivateProfileString(psSection, 0&, 0&, m_FileName)
' if lRet = 0 an error has occured
If lRet = 0 Then GetTheLastError
DeleteSection = CBool(lRet)
End Function
Paul
ReplyOriginally posted by: XW
I really need the code, but download doesn't work well.