|
-
Oct 29th, 2008, 11:59 AM
#1
Thread Starter
New Member
[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
-
Oct 29th, 2008, 12:12 PM
#2
Hyperactive Member
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
-
Oct 29th, 2008, 12:29 PM
#3
Thread Starter
New Member
Re: [2008] Visual Basic 2008 INI READ/WRITE
 Originally Posted by .NetNinja
Yeah i see. but how to read the ini and put the readed value in a textbox?
Thx
-
Oct 29th, 2008, 12:34 PM
#4
Re: [2008] Visual Basic 2008 INI READ/WRITE
TextBox1.Text = variable that you read in from your ini
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Oct 29th, 2008, 12:36 PM
#5
Hyperactive Member
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.
-
Oct 29th, 2008, 11:39 PM
#6
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.
-
Oct 30th, 2008, 09:02 AM
#7
Thread Starter
New Member
Re: [2008] Visual Basic 2008 INI READ/WRITE
I don't know what you mean...
Where can i found a tutorial about it..?
-
Oct 30th, 2008, 11:10 AM
#8
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
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|