| View previous topic :: View next topic |
| Author |
Message |
OSIRIS Grandmaster Cheater
Reputation: 0
Joined: 27 Aug 2006 Posts: 654
|
Posted: Tue Mar 11, 2008 3:02 pm Post subject: [HELP] VB2008 Settings |
|
|
Basically I want to save the text of textbox1.text but its not working. The program that I will soon release will the best one out of all my releases so I need to know how to do this.
| Code: |
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
My.Settings.Save.TextBox1.Text()
End Sub
|
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Mar 11, 2008 3:24 pm Post subject: |
|
|
| TextWriter class, in System.IO
|
|
| Back to top |
|
 |
OSIRIS Grandmaster Cheater
Reputation: 0
Joined: 27 Aug 2006 Posts: 654
|
Posted: Tue Mar 11, 2008 4:09 pm Post subject: |
|
|
| slovach wrote: | | TextWriter class, in System.IO |
So what code would I put in my button
-------------------------
NVM, ill just save my setting to a file. Then form_load it will look for that file.
|
|
| Back to top |
|
 |
jason744 Grandmaster Cheater
Reputation: 0
Joined: 25 Nov 2007 Posts: 638
|
Posted: Tue Mar 11, 2008 4:35 pm Post subject: |
|
|
Did you make a setting named textbox1?
And It would be in the textwriter class, live slovach said.
If so, In form SHown event:
| Code: | | Me.TextBox1.Text = My.Settings.TextBox1 |
In Form Closing event:
| Code: | My.Setting.TextBox1 = Me.TextBox1.Text
My.Setting.Save() |
My.Setting.Save saves all the settings, you can't tell it to save one.
You have to make a setting, in my project first.
And you have to declare the settings is connected with the text propertie of the textbox.
|
|
| Back to top |
|
 |
OSIRIS Grandmaster Cheater
Reputation: 0
Joined: 27 Aug 2006 Posts: 654
|
Posted: Tue Mar 11, 2008 4:39 pm Post subject: |
|
|
| jason744 wrote: | Did you make a setting named textbox1?
And It would be in the textwriter class, live slovach said.
If so, In form SHown event:
| Code: | | Me.TextBox1.Text = My.Settings.TextBox1 |
In Form Closing event:
| Code: | My.Setting.TextBox1 = Me.TextBox1.Text
My.Setting.Save() |
My.Setting.Save saves all the settings, you can't tell it to save one.
You have to make a setting, in my project first.
And you have to declare the settings is connected with the text propertie of the textbox. |
|
|
| Back to top |
|
 |
jason744 Grandmaster Cheater
Reputation: 0
Joined: 25 Nov 2007 Posts: 638
|
Posted: Tue Mar 11, 2008 4:51 pm Post subject: |
|
|
| Make a setting called textbox1 and put it as writer thingy class.
|
|
| Back to top |
|
 |
OSIRIS Grandmaster Cheater
Reputation: 0
Joined: 27 Aug 2006 Posts: 654
|
Posted: Tue Mar 11, 2008 4:58 pm Post subject: |
|
|
| jason744 wrote: | | Make a setting called textbox1 and put it as writer thingy class. |
ya, I dont know how to do that.
|
|
| Back to top |
|
 |
|