.net - Persistence Of User Scoped Settings?

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


ADVERTISEMENT

Gradually Transition To NHibernate Persistence Logic From Existing ADO.NET Persistence Logic?

Sep 3, 2010

The application uses ADO.NET to invoke sprocs for nearly every database operation. Some of these sprocs also contain a fair amount of domain logic. The data access logic for each domain entity resides in the domain class itself. ie, there is no decoupling between domain logic and data access logic. I'm looking to accomplish the following:

[Code]...

View 2 Replies

ClickOnce Overwrites User Settings Settings .NET 2008 Cant Use Registry UAC Causes Error

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

VS 2010 - My.Settings - Can't Find File Which Reflects Changes To User Settings

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

Reset User Settings In My.Settings?

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

Save User Settings Using My.Settings?

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

Save Application Settings But For USER But Cannot Find The User.config File

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

Application For User - Run As The User And Preserve Individual Settings

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

Save A Collection Of Key/value Settings In My Application's "user Settings"?

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

MessageBox Persistence In .net?

May 30, 2011

I'm using MessageBox to give some information to the user, but when such a box pops up, I want it to block access to the main window. So, until the user has clicked "OK", they should not be able to click (or even focus on) the window that's below it.

Does anybody know how to do this? I've noticed that MessageBox has very few functions, so maybe I'll even have to use a different object for this.

View 3 Replies

ASP.NET Server Data Persistence?

May 28, 2010

I'm not really sure exactly how the question should be phrased, so please be patient if I ask the wrong thing.I'm writing an ASP.NET application using VB as the code behind language. I have a data access class that connects to the DB to run the query (parameterized, of course), and another class to perform the validation tasks - I access this class from my aspx page.What I would like is to be able to store the data server side and wait for the user to choose from a few options based on the validity of the data. But unless my understanding is completely off, having persistent data objects on the server will give problems when multiple users connect?

My ultimate goal is that once the data has been validated the end user can't modify it. Currently I'm validating the data, but I still have to retrieve it from the web form AFTER the user says OK, which obviously leaves open the possibility of injecting bad data either accidentally (unlikely) or on purpose (also unlikely for the use, but I'd prefer not to take the chance).So am I completely off in my understanding? If so, can someone point me to a resource that provides some instructions on keeping persistent data on the server, or provide instruction?

Concrete Example: We recently hired Inspector Gadget to insert data for the Sign Inspectors who go 'round inspecting the highway signs to make sure none of them have been mangled or stolen by bubble-gum chewing, normally upstanding members of the youth city council.If Gadget can prove his mettle then he might get promoted to do the actual sign inspections. For now, his only job consists of going to this intranet site an inputing information about the most recent inspections. The district, county, route #, section of road, and dates the sign was installed and inspected.

Of course any of us who were alive in the late 80's are familiar with Gadgets ineptitude. So the site is about as Gadget proof as we can make it. The district/county/route is all filled out through a dropdown list, he only has to manually enter the section start and end and the dates. On occasion he fumbles the mouse and ends out swapping the begin and end of the section, doh! So the text turns red to alert him of the mistake. Unfortunately he chose to wear his anti-red sunglasses today that turn all red colors to black. Well, after attempting to submit the data it shows him an error message telling him where and what he needs to fix. Unfortunately he fat fingered the keyboard and instead of inputting 1.337 he put in 13.37 (miles)- and the road is only 10 miles long! Well, now a message (a modal div) pops up and tells him that the real mileage for the road is 0-10, and that his entry will combine three sections of the road. Then he is given three buttons to choose from. Cancel, which allows him to go and modify his data, Constrain, which will convert 13.37 to 10, and Override which will allow him to input that data anyway.

"Yowza!" Gadget exclaimed, and clicked cancel to go back and fix his mistake. Well the next set of data he input correctly, so a confirmation message popped up showing him the changes he was about to make and asking if it was OK to continue. Well, unfortunately Inspector Gadget knocked over his coffee cup, scattering detritus across his desk. In his haste to clean it up, he clicked "OK", but not before his Go-Go-Gadget electro-magnet accidentally flipped a few bits on his computer, changing the county in the form from ARKANSAS to AKRSANAS, doh!

Had the data been stored on the server across campus, and the only information passed was "OK" or "Cancel", this would have been avoided.Of course I can always validate again after the "OK", but it just seems like a hacky workaround.

View 2 Replies

.net - Use Singleton Pattern For LINQ To SQL Persistence?

Apr 16, 2011

I have a table, Users, with a related child table, UserSecurityGroups. In my GUI, the operator would select a user from a list. The program would retrieve the user record and allow the operator to edit the user data in one form. The operator could also edit the UserSecurityGroups of this user on another form.

I am considering using a singleton class for user instance retrieval and persistance back to the database. If this is a good practice, I want to use this with many other tables in my DB. My question is: Is this a good practice? What pitfalls am I missing? What would you recommend as an alternative? Would your recommendation change since I also have tables with three or four levels of relations (as opposed to two in the example above)?

Here is my proposed code:

Imports System.Data.Linq
Public Class UserConduit
Implements IDisposable

[code]....

View 1 Replies

Custom Control Property Persistence During Runtime

Aug 30, 2011

How to get a property to persist after its been changed dynamically during run-time? When Visual Basic reverts back to the IDE, the property goes right back to its original value.

View 3 Replies

Passing In User Settings

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

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

.net - NumericUpDown.value Is Not Saved In The User Settings?

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

Reading And Writing Various User Settings?

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

Save User Settings At RunTime?

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

User Settings Not Working On Form

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

User Settings XML Serialization Of An Object?

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

VS 2008 User Settings Saving?

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

When A Different User Logs Into Computer They Have Different Settings

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

[2005] Transfer User Settings

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

.net - Click-Once Deployment Overwriting User Settings?

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

Adding A Browsing History With User Settings?

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

Allow The User To Save Their Prefered Settings In VB During Runtime?

Aug 28, 2009

How to allow the user to save their prefered settings in VB during runtime?

View 6 Replies

Application/User Settings With Roaming Profiles?

Nov 10, 2009

We have an application that's installed at several locations but we are having an issue at one particular site. In short the application settings (My.) are not being saved after a reboot. The application is build in VB.Net v3.5 Framework and we are not experiencing any issues elsewhere.

This particular site is using roaming profiles and the network administrator ensures us that the correct permissions are applied to the user account(s) and all application data is being saved to the server. I've asked the network admin to check for the existence of the user settings file user.config in the Application Data directory and he says it doesn't exist.

In our application we store the connection string to the database in the application settings under the user scope. If no connection string is present or if one is present and a connection to the database cannot be made then a form is shown asking the user for the database credentials. Each morning when the users boot the machine and opens the application for the first time they are asked for these credentials but if they close the application and restart it they are not asked for them. This indicates to us that the settings are being saved but once the pc is rebooted and the application is opened for the first time they are asked for the database credentials. This seems like the settings are not persisting after a reboot.

View 1 Replies

C# - User Settings Keep Resetting To Default After Each Deployment?

Aug 18, 2009

My deployment of upgrades to an application written in C# (.NET 3.0) consist of simply replacing an older .exe with the new one. Because that older version can currently be used by some customers, I simply rename the old version to blahblah.exe.old and copy the new one to the same folder. When the user opens up the application again, the new one loads up.

The problem is, every time I deploy a new version, the user scope settings are always reverted back to the default values.

View 1 Replies

Change User Settings In ClickOnce Deployment?

Apr 27, 2010

I have a program, written in VB 2008, that I deplpoy in Terminal server, that has some user settings (scope: user) that I'd like to modify locally. By default the user settings were not even installed locally. I think they are supposed to appear in the ClickOnce data directory. Using the following thread, I was able to get the user.settings installed locally:

[URL]

basically, i set my xml file as "Content" and I set the publish status as "Data File".

With this, my settings file appears in:

"C:Documents and SettingsusernameLocal SettingsApplication DataCompanyXYZProgramNameL.exe_Url_arzmal0maveh1nnwfib245pfk13xqfma1.0.0.0user.settings"

The problem is that modifying this file doesn't affect the application. I changed some settings, restarted the app, and changes were ignored.

View 1 Replies

Connect Datagrid To Application Settings (user)

Jun 7, 2010

trying to connect a datagrid to some data I have stored in my application settings I'm using: system.collections.specialized.stringcollection and the scope is user. All I want to do is allow a user to add or delete values from the app settings, I've tried using a datagrid but I cant connect to the application settings.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved