View Full Version : C# User Settings
Kalub
August 14th, 2008, 07:53 PM
Anyone know how to properly use User Profiles in C# Express 2008? I need to be able to read a value from DownloadURL on Form1 load, and apply it to a text box(txtDwnlURL), and then if it changes re-save it to that setting on Form1 close.
Please help.
Limited
August 15th, 2008, 08:41 AM
Hmm this might be a bit of help.
http://imar.spaanjaars.com/QuickDocId.aspx?QUICKDOC=376
Kalub
August 15th, 2008, 10:16 AM
Sadly, that won't work the for what I need to do. Here is an article on what I would like to do, but it is for C#E2005 not 2008. Anyone care to upgrade the code?
http://msdn.microsoft.com/en-us/library/aa730869(VS.80).aspx
Limited
August 15th, 2008, 11:14 AM
Oh, your using that settings? Thats for the app.
That will work for C# 2008.
Kalub
August 15th, 2008, 04:55 PM
Yea, well it doesn't. And while I may be using that method, I don't want to use the application settings, which are read only. I want to use the User settings.
If you could contact me via IM that would be great.
Patrickssj6
August 16th, 2008, 01:02 PM
Wait...what is your problem again? You want to store a value so you can retrieve it at startup again?
Just make a new setting either Application/User and just use the code
Properties.Settings.Default.<SettingName> = <YourValue>
Kalub
August 16th, 2008, 04:13 PM
Meh, thats that hard way....
Data bindings are easier, also.
Properties.Settings.Save();
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.