473,499 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

maintain state of application for each user

I would like store and recall user settings and window state for each
user of my application. By state I mean recalling at application
start the location in a list view the app was at the last time it
exited.

If I was maintaining this state regardless of user I would store it as
an xml document in the same directory as the program binary.

What is the windows standard way of storing user specific files of an
application? Can I create a shadow directory tree under the c:/users
directory that matches the directory path of the appl exe file?

thanks,

-Steve

Mar 2 '07 #1
2 2100
Try creating the file in Application.UserAppDataPath directory. This is the
directory for each user where you can put stuff for your application. It is
automatically application specific (a subdirectory will be made for your
app).

"Steve Richter" <St************@gmail.comwrote in message
news:11**********************@h3g2000cwc.googlegro ups.com...
>I would like store and recall user settings and window state for each
user of my application. By state I mean recalling at application
start the location in a list view the app was at the last time it
exited.

If I was maintaining this state regardless of user I would store it as
an xml document in the same directory as the program binary.

What is the windows standard way of storing user specific files of an
application? Can I create a shadow directory tree under the c:/users
directory that matches the directory path of the appl exe file?

thanks,

-Steve

Mar 2 '07 #2
>I would like store and recall user settings and window state for each
user of my application. By state I mean recalling at application
start the location in a list view the app was at the last time it
exited.

If I was maintaining this state regardless of user I would store it as
an xml document in the same directory as the program binary.

What is the windows standard way of storing user specific files of an
application? Can I create a shadow directory tree under the c:/users
directory that matches the directory path of the appl exe file?
What follows is probably the de facto way to do it now since it's integrated
right into VS. It's certainly the easiest and cleanest way I've discovered.
Also consult the "See Also" section at the bottom of the following link and
take a look at the "ApplicationSettingsBase" class which drives the entire
process (though you don't have to get your hands dirty with this too much
since VS automatically creates a strongly-typed "Settings" derivative for
you). You'll have to do a little research to figure things out of course but
the latter "Settings" class does most of the dirty work for you. It really
makes handling settings a breeze IMO.

http://msdn2.microsoft.com/en-us/lib...e8(VS.80).aspx
Mar 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3438
by: | last post by:
This is a very open ended question. I have an app with a page that uses link buttons to change the display. On the prior page you have a list of objects. You click one of those objects to see it's...
5
5143
by: Dominic | last post by:
My question is about how to maintain view state in mobile ASP.NET across postback / request in a web farm environment. First of all, let's assume the web-farm does NOT use stick-session feature....
1
2879
by: Robert Burdick [eMVP] | last post by:
Hello All: I am writing an ASP.NET application that will take the user to PayPal to make some payments. Before going to PayPal, I collect relevant user information and store it in a session...
9
5288
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
7
10334
by: Andrew Robinson | last post by:
I have a treeview control that I use as a menu & navigation control within a master page. The nodes for this control are loaded from a database which contains the text and url of each like and the...
1
3749
by: SevDer | last post by:
Hi, I would like to know, if it is possible to maintain affinity by having a webgarden for our ASP.NET application in multi CPU server? And of course if possible without or minimal code change...
11
7882
by: Joseph Geretz | last post by:
I've been looking at two approaches for the maintenance of Session state for a Web Service application. One approach uses the old familiar Session object which I've used in the past for Web...
4
14703
weaknessforcats
by: weaknessforcats | last post by:
Design Patterns – State Often computer software operates based on a condition called a state. These states traditionally have been implemented using a switch statement. The cases of the switch...
0
2195
by: =?Utf-8?B?SkhhbGV5?= | last post by:
Our system is: IIS Server: dual Intel Xeon 2.80 GHz, 4 GB Ram Windows Server 2003 SP2 IIS 6.0 SQL Server: dual Intel Xeon 2.80 GHz, 4 GB Ram (separate server) Windows Server 2003 SP2 SQL...
0
7131
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7388
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4600
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
297
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.