9 Replies - 452 Views - Last Post: 10 November 2012 - 11:31 AM
#1
Keep Value in textfield the same next time form load...
Posted 04 October 2012 - 10:04 AM
...But I don't want to do neither one of those. I don't what to save a password to a textfile, and some computer don't have internet connection. So what do I do?
Replies To: Keep Value in textfield the same next time form load...
#2
Re: Keep Value in textfield the same next time form load...
Posted 04 October 2012 - 10:22 AM
Create a user type setting and upon loading of the form set the TextBox's .Text property = My.Settings.{whateveryoucalledyoursetting}
Make sure you update the setting if someone changes the textbox.
#3
Re: Keep Value in textfield the same next time form load...
Posted 04 October 2012 - 10:34 AM
#4
Re: Keep Value in textfield the same next time form load...
Posted 04 October 2012 - 10:40 AM
Create a setting there of type string for User scope and set it's value to what you want to appear in your textbox.
Then upon loading the form you can get that value by using My.Settings.{Setting Name}
Since it is a string in this case, you can set the textbox.text = my.settings.{setting name}
#5
Re: Keep Value in textfield the same next time form load...
Posted 04 October 2012 - 10:45 AM
This post has been edited by clee06: 04 October 2012 - 10:45 AM
#6
Re: Keep Value in textfield the same next time form load...
Posted 04 October 2012 - 10:52 AM
I will say this though, when you create these a .config file is created to hold this information. If you move the executable without its accompanying config file, the textboxes won't be filled. But again, that's probably not really any different than making sure your textfile follows the application.
This post has been edited by CharlieMay: 04 October 2012 - 10:54 AM
#7
Re: Keep Value in textfield the same next time form load...
Posted 04 October 2012 - 10:57 AM
Thank you so much you are a life saver.
#8
Re: Keep Value in textfield the same next time form load...
Posted 04 October 2012 - 11:17 AM
#9
Re: Keep Value in textfield the same next time form load...
Posted 04 October 2012 - 12:12 PM
CharlieMay, on 04 October 2012 - 11:17 AM, said:
great, i'll save the password to a table?
#10
Re: Keep Value in textfield the same next time form load...
Posted 10 November 2012 - 11:31 AM
I created a user scope called "try" with the value of "test".
I want to make a form to change that value. how would I code that syntax? so far my form has a textfield called 'txtTRY' that takes in the value of the 'try' and a button "btnSAVE". When I change the value in txtTRY and click btnSAVE, I want to 'try' new value to be whatever textbox tryTRY' is.
txtTRY.text = My.Settings.try
|
|

New Topic/Question
Reply




MultiQuote




|