[2008] Visual Basic 2008 INI READ/WRITE
Hi this my first time here.
i'm a beginner in visual basic 2008.
I want to make form when i open it read the ini and put the information in the textbox.
Example:
Start program: INI Read: Pickups=620
textbox must say 620 when i change 620 to 455 and press on a bottom
i saves 455 to the ini INI Saved: Pickup=455
Can anybody help me?
i'm from the netherlands Thanks for help!
My english is not verywell ;)
Re: [2008] Visual Basic 2008 INI READ/WRITE
Here is an article that explains how to do it using API calls:
http://www.codeproject.com/KB/files/...ssIniFile.aspx
Re: [2008] Visual Basic 2008 INI READ/WRITE
Quote:
Originally Posted by .NetNinja
Yeah i see. but how to read the ini and put the readed value in a textbox?
Thx
Re: [2008] Visual Basic 2008 INI READ/WRITE
TextBox1.Text = variable that you read in from your ini
Re: [2008] Visual Basic 2008 INI READ/WRITE
Everything you will need is given in the sample code download in the article I gave you.
Re: [2008] Visual Basic 2008 INI READ/WRITE
You should avoid using INI files at all if it's within your power. .NET apps have inbuilt support for XML config files. The simplest way to use one is to add values on the Settings tab of the project properties and then access them via My.Settings in code. You simply read and write like any other properties. All the loading and saving is done for you.
Re: [2008] Visual Basic 2008 INI READ/WRITE
I don't know what you mean...
Where can i found a tutorial about it..?
Re: [2008] Visual Basic 2008 INI READ/WRITE
in your IDE, click Project-->Properties-->Settings tab
there you can add a new my.settings property.
to use it:
vb Code:
my.settings.newPropertyName = "aString" ' or any value, set datatype accordingly
my.settings.save
then in your form_load event:
vb Code:
textbox1.text = my.settings.newPropertyName