User Settings Not Working?
May 16, 2012
So, I've created a form that allows for the user to save his or her settings after closing it. When using Visual Basics to run the program, there is no problem and it works wonders.Here is the problem.When I run the program not in Visual Basics, when I go to open the form, it fails. At first, it was because I didn't update the configuration file to include the new settings. Which was dumb, of course, but I updated the file and made sure to put it with the program.
View 2 Replies
ADVERTISEMENT
Jun 3, 2011
So, I've created a form that allows for the user to save his or her settings after closing it. When using Visual Basics to run the program, there is no problem and it works wonders. When I run the program not in Visual Basics, when I go to open the form, it fails. At first, it was because I didn't update the configuration file to include the new settings. Which was dumb, of course, but I updated the file and made sure to put it with the program.
However, when I opened the program again, it failed. So, I tried putting an error message in the form so I know why it failed. This time, it would come back saying "Error Occurred. The Following Error Occurred:" and that is it. No details at all why it was having any problems reading my new user settings. Once again, the user settings work fine in visual studios. It has the updated configuration file in the same place it is.
View 1 Replies
Aug 5, 2009
I am rewritting my application to conform to ms standards. We used to save all settings to registry for user settings, servername, size and locations.so we are now saving them into My.Settings app.config the only problem is that each time there is an update clickonce will isntall the newupdate but now all settings are loist and user has to save everything all over again..
I am trying to follow the book here but it seems i keep getting stuck somewhere. registry has worked fine for years but i understand we must move on, but if stuff like this happens then i just wasted a long time converting all code to conform for it to not work..
View 1 Replies
Apr 15, 2011
1. I can't find the file which reflects changes to user settings. This might be because I just can't find it (I can see a bunch of user.config files but they are all empty - weird!), or...
2. I'm not actually saving them when I think I am.
Regarding 2. - do I need to invoke
Is this all I need? And if so, why are my user.configs empty?
View 1 Replies
Apr 19, 2012
I can double click on the Setting.settings and the projects Settings grid appears in design. I change the value of a user scope setting yet when I run the application in debug it picks up a value I set initially instead of the current value of the setting.
When the app starts I set a connection string to the path of the .SDF file that I set in the Settings.settings grid and accesss it with
mRootSDFPath As
String =
My.Settings.SDFConnectionString
[Code].....
View 6 Replies
Jun 29, 2010
how to reset user settings in My.Settings to the default value, because when i checked if the user settings works i have altered the settings so now i want the settings to go back to default, because i am going to distribute the software.
View 1 Replies
Jun 8, 2010
how i can save user settings in vb.net
i have a project with different buttons when a user clicks a button the image of PictureBox1 will change.
i want to save this image that the user has chosen after he closes the application, so it will be displayed in PictureBox1 when loaded.
i am using Microsoft Visual Basic 2010 Express
the languge is VB
View 5 Replies
Aug 7, 2009
in vb.net i am trying to save application settings but for USER but i cannot find the user.config file
when does this file get created?
i searched my entire hardrive. i also searched the entire project.
View 2 Replies
Jun 5, 2010
I am attempting to create an application in an attempt so it could be run as the user and preserve individual settings, by this what i am trying to achieve is when the application is installed, it is installed once but each user has their own settings saved within their own profile - a bit like Office applications. How could i start with this?
View 8 Replies
Apr 14, 2008
I'm trying to save a collection of key/value settings in my application's "user settings" (they're column widths), but while I see no errors, when I run the code (in the IDE) my collection in "My.Settings" is always nothing at startup. I do a "My.Settings.Save" when the application exits, and barring the "serializers not found" errors in the IDE, no other errors occur. When I run my application as an exe, it behaves the same way..
View 7 Replies
Oct 18, 2011
I don't even know where to begin describing this. I have a project, that uses settings, for some paths, settings that I retrieve with the My.Settings. function.In my laptop, when I change the .exe.config file, the settings are updated accordingly, but when I try that on the production server, it just shows the default value used while compiling.
I tried changing the solution configurations to debug and other custom configs with no effect.Tried to use the same folder copied and pasted without version control, still the same result.Tried a co-workers laptop, by using the last svn revision, it works there too. But on neither of the servers works.
View 1 Replies
Oct 1, 2011
I have some System.Collections.Specialized.StringCollection 's in my.settings and the won't do anything: I have tried adding things to them and I get a null reference, now I have used these before and they worked fine I have tried reading from them, like I have in the past, and it dosen't read anything; the strings come out emtey as in one emtey string when there is three full strings
[Code]....
View 1 Replies
Jun 15, 2011
I have a application that requires access to a tablet, the tablet in order for it transfer data accurately needs to be calibrated from time to time. Users have expressed intrest that once calibration has been done and has been validated to be correct that
those new settings be ready for use in the main application. However, the only way I have been able to do this is to physically re-start the application. I have not had any luck with My.Settings.reload(). The settings I can confirm have changed but the application after saving them and calling the reload do not reload them. Am I doing something wrong? Does reload only work under certain conditions?
View 4 Replies
Dec 19, 2011
I am implementing a mechanism to detect a corrupt user.config file in vb at application startup.
I do this at the start of the application before initializing anything.
If an exception is thrown while trying to access it, I replace the file with a backup last known good copy.
After replacing the bad file and physically checking that we have a good file I run the code :[code...]
View 1 Replies
Aug 19, 2009
when my.settings.datastorage has nothing in it, this works fine. but after i go through this twice, it gives me an error
[Code]...
View 1 Replies
Oct 28, 2009
I've updated my settings via:
My.Settings.SomeString = "new text"
then I call
My.Settings.Save()
When I check the .config file, the entry under
<userSettings>
<BE.IS.My.MySettings>
<setting name="SomeString" serializeAs="String">
[code]....
... the value remained the same, unchanged.1 thing though, my app is started via Sub Main() in module file, instead of "Enable application framework". Does this affect the saving of Settings file?
View 5 Replies
Oct 2, 2009
My Form closing
[code]...
Note: I tried this with a textbox and it worked. The Textbox text was the labels closing, but when I used this with label, it didnt work.
View 1 Replies
Mar 29, 2010
I am using VB.NET 2005 and running non embedded crystal reports from the SQL server and have following variables database name, server name, user name and password in the application settings editor and given the default values.
I have created a form that allows these settings to be changed by the user and the probem that I am having is that, the reports are still running with incorrect credentials. The following code runs when the user modifes the values and clicks OK button
[Code]...
View 3 Replies
May 30, 2011
I am a beginner using 2008 Express and I am trying to get my application to remember and restore some combobox values. It seems to work fine if the application is opened and closed normally but for some reason it loses the settings if it is opened from the startup folder.
Here is how the startup link is formed:
Dim shortcutFile As String = Environment.GetFolderPath(Environment.SpecialFolder.Startup) & "FBNav.lnk"
If Not IO.File.Exists(shortcutFile) Then
[Code]....
View 2 Replies
Sep 15, 2010
I have an application that uses user settings and I have a button that gets a value (long) and writes this in a textbox I then have a setting called StoredKey with the data type of long I then pass this to the setting like this:my.settings.StoredKey=cLng(textbox1.text)this all works well in debug, but when I deploy my application and try to store the value in my.settings.StoredKey the value never gets written in!by deploy I mean packaging the exe in a setup and deployment project type and performing the wizard install to c:program files.[code]
View 1 Replies
Nov 23, 2011
I have a NumericUpDown Control on a form. In the Application Settings / Properties Binding, for the value parameter, i can't select my USER setting called : Heures (Integer / User).
[Code]...
But it's not saved.No problem for other settings (String / User). But i don't understand why the settings (Integer / User) are not saved.
View 1 Replies
Jan 22, 2012
I have a Boolean, user scoped setting. I access it through a referenced class library, called Settings. This class library has a Module with properties:
[Code]...
While the code is running this works. But after a restart of the application the new value is not persisted.
View 2 Replies
May 18, 2011
I'd like to know if there's a better way to read/write various user settings to disk. My program loads up a bunch of settings during load but also during execution from a few different forms, encrypted string values, boolean values, different types. The code seems to work okay but I have a feeling it's just not the best way to be doing this. Some of the settings are encrypted strings that have to be decrypted/encrypted so the code to read/write the text file is a bit different on some items. The data read from disk usually goes to a public string, a textbox, or a up/down type control. Below is about 1/10th of the settings that get loaded/written at various times. Anyone have a better way that might be more efficient that I should look at?
[Code]...
View 2 Replies
Aug 12, 2010
This has 2 ComboBoxes, 2 Buttons, a FontDialog & a RichTextBox.The code I used :
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.Items.AddRange(New String() {"London: 51N30, 00W07", "Paris: 45N38,5E44", "Colombo-Sri Lanka: 06N55,79E50", "Chennai-India: 13N05,80E17", "Sydney-Aus: 33S53, 151E13", "Toronto-Canada: 43N40,79W25", "New York-USA: 40N42,74W00"})
[code]....
View 8 Replies
Jul 17, 2009
I am trying to save a custom object as a user setting in a VB.net app. This object consists of a List(Of Pair(Of String, Object)). Pair is a custom class which has two read/write properties (a String and an Object).
If I put simple types like int, string, datetime as the second value of my pair, the setting is saved without any problem. But if I try to put something more complex, like a list, there seems to be a problem during serialization and my setting is not saved.
String values in my pairs are serialized like this:
<value1>Priority_1</value1>
Object values are serialized with a special attribute:
<value2 xsi:type="xsd:int">2</value2>
Seems like values of type Object are serialized differently, to "remember" what is the real type of the object. Why can't it do the same for more complex types like List(Of T)?
View 1 Replies
Dec 12, 2009
Okay so i have a problem with saving the users settings. Okay i have about 50 check boxes on my frm1.So for example if the user clicks on check boxes 1 and 2 the next time when the user starts the program i want check box 1 and 2 to be checked
[Code]...
View 15 Replies
Jul 29, 2010
I am using my.settings to save settings. Problem is when a different user logs into the computer they have different settings. Is there a way to use my.settings to work across all users that log in?
View 5 Replies
Mar 6, 2009
I noticed that the application settings (user.config) are stored in my AppData directory which is names quite oddly: C:UsersclarkgriswaldAppDataLocalCompanyMyApp10.exe_Url_zwsqzsjtunwuxfkklwa3fcjple4hufb01.0.0. 0 Is there anyway to adjust that path? The main reason is that when I release a new version, I want to copy the old settings into the new application's directory, and with a name like that, it's not really feasible.
View 1 Replies
Feb 4, 2010
Click-once deployments are suppose to maintain user settings, but on this one application we have the user settings are overwritten to the Visual Studio default every time we publish an update.
View 2 Replies
Apr 2, 2009
I'm creating an open-source web browser in VB.NET and I'm trying to load the browsing history from My.Settings.History (StringCollection) and list the items in a listbox, but only the first item appears.
Here is the code I am using:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code].....
View 14 Replies