Jump to content

Quick Help


Recommended Posts

I am still in the process of learning vb, and have a quick question. I have a settings form for that bot that I am working on, and want to get the settings form to write to a config.ini file. I got the form to read from the ini file correctly, but I seem to be having trouble getting it to write to the ini. For my save button, I have the variable SaveSettings, which is defined as so :

CODEPublic Sub SaveSettings()

If Not bClear Then Exit Sub
WriteINI "Channel", config.Channel.Text
WriteINI "server", config.server.Text
WriteINI "Name", config.Username.Text
WriteINI "Pass", config.Pass.Text
WriteINI "Client", config.Client.Text
WriteINI "CDKey", config.CDKey.Text
End Sub

and I have the WriteINI function defined as so :

CODEPublic Sub WriteINI(sKey As String, sValue As String)

WritePrivateProfileString "General", sKey, sValue, App.Path & "\config.INI"

End Sub

For some reason, it does not write to the ini, and I am pretty stumped on this one. Knowing me, it probably will turn out to be a stupid mistake, but if anyone would like to help me, I would appreciate it.

-Batch User

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...