|
-
Jun 11th, 2007, 05:41 AM
#1
Thread Starter
Member
-
Jun 11th, 2007, 05:45 AM
#2
Re: [2005] A Weird doubt with TextBox Control
Check out My.Settings in 2005.
You can save that information and use it. Then if you want to change the details, chage the variable in settings and save them.
-
Jun 11th, 2007, 05:53 AM
#3
Thread Starter
Member
Re: [2005] A Weird doubt with TextBox Control
dear friend stimbo...
can u help me do it ?
-
Jun 11th, 2007, 06:01 AM
#4
Re: [2005] A Weird doubt with TextBox Control
If you check out on the taskbar: Project -> Properties -> Settings (Panel)
You will then be able to create variables there with values. You can create 2 string variables, one for username and one for password, including values.
In the form Load you can input the variables like this:
vb Code:
Me.UserNameBox.Text = My.Settings.userName
-
Jun 12th, 2007, 01:59 AM
#5
Thread Starter
Member
Re: [2005] A Weird doubt with TextBox Control
thanks stimbo...
but my intention is different from this one.
according to ur suggestion
the username and password always remains the same as wat i m goin to
give in value field of settings section.
but my intention is
when the exe file was run for the first time
it wil prompt for username and password.
after typing it and running.. the application wil never
prompt for username and password anymore.
but in case by chance if the user wish to input a different
username and different password after running the exe 10 or 20 or so many times then i have to supply a different control that helps the user to input
the new username and password.. and thereafter the newly inputted credentials will be used forever till the user again wishes to change it.
the explanation is very simple..
its like locking the textboxes with the user specified values.
and if needed unlocking it for new values and again locking it.
can this be possible ?
-
Jun 12th, 2007, 02:06 AM
#6
Fanatic Member
Re: [2005] A Weird doubt with TextBox Control
the use of my.settings is that it stores the default value that you want for your application. When the application is executed, you can check for the existence of the attributes userName and password, if there are not there, then it is the first time and you prompt for a username and password and save the info in the my.settings.
Whenever you want to change those values, just
vb Code:
my.settings.username = textbox1.text
-
Jun 17th, 2007, 10:52 AM
#7
Thread Starter
Member
Re: [2005] A Weird doubt with TextBox Control
i tried it friend.
it shows the value i gave in my settings.
but how to bring the value from the text box to this settings value field
during run time ?
-
Jun 17th, 2007, 12:18 PM
#8
Re: [2005] A Weird doubt with TextBox Control
This is a horible method for saving the username and password because it is stored in plain text. That means that anyone can access the username and password simply by opening the user.config file. Is security a concern in your app?
-
Jun 18th, 2007, 03:14 AM
#9
Thread Starter
Member
Re: [2005] A Weird doubt with TextBox Control
no it isnt... security isnt a big deal of concern for me..
coz i am just giving this app to my team mates.
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
|