MSFN Forum: Quick Help - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Quick Help Rate Topic: -----

#1 User is offline   Batch User 

  • Newbie
  • Group: Members
  • Posts: 28
  • Joined: 23-November 06

Posted 29 November 2006 - 05:37 PM

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


#2 User is offline   Batch User 

  • Newbie
  • Group: Members
  • Posts: 28
  • Joined: 23-November 06

Posted 30 November 2006 - 06:54 PM

Sorry for the bump, but can anyone PLEASE help?

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy