By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,686 Members | 1,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,686 IT Pros & Developers. It's quick & easy.

User "sticky" profile

P: n/a
Hi all

This question is one of "theory" rather than a search for the specifics of a
solution. I need some pointers as to how to proceed with my project.

Here goes.

My application allows the user to select from menu options. Some of the
menus allow the user, via an options form, to select parameters for the
display of reports. Those parameters will include things like the date range,
the report type (detail or summary) and several others. All of this is
already coded and works exactly as required and designed.

To develop the application further I want to introduce what I call "sticky"
profiles.

A user logs in ......
That user access the menus and option forms and makes selections for his/her
report requirements.
That user logs out.

When that user logs in again (irrespective of how much later and how many
other users have logged in in the interim) I would like the application to be
able to set the various option form objects (list boxes, date/time pickers,
combo boxes etc.) to the last value selected by that user. And, in the same
way, the application should set those options to the users last choice, at
any time a new instance of the option form is invoked during any session.

I think, perhaps I'm wrong, that this is quite a wide-open question, but I'm
looking for guidance on methodology rather than a specific "do this or do
that" response.

Hoping someone out there may already have such a solution in use and can
suggest a way forward.

Regards

Michael Bond
Feb 23 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
mabond wrote:
Hi all

A user logs in ......
That user access the menus and option forms and makes selections for his/her
report requirements.
That user logs out.

When that user logs in again (irrespective of how much later and how many
other users have logged in in the interim) I would like the application to be
able to set the various option form objects (list boxes, date/time pickers,
combo boxes etc.) to the last value selected by that user. And, in the same
way, the application should set those options to the users last choice, at
any time a new instance of the option form is invoked during any session.

Michael Bond


Assuming the 'user logs on' means logging into windows, you could
concider storing the settings in the registry since all users have their
own registry (hkey_current_user) (not Win9x AFAIK). This is the way I do
it for one of our applications to store some per user settings.

If you mean logging into your application you'll probably have to use
some kind of database/XML to store the settings in. Be it a table in an
existing database (of your app) or a seperate new one is your decision.

You'll just need to remember to store the settings when the user closes
the form.
--
Rinze van Huizen
C-Services Holland b.v
Feb 24 '06 #2

P: n/a
mabond,

I am using a class that I wrote to store user settings in an XML file.

You may read about this class here:
http://www.storyitc.com/cursite/default.htm

I have since updated it. The updated code can be found by going to

http://www.storyitc.com/codesamples

and clicking on clsPropertyManager (this is a text file, you need to copy
it into a file with a .vb extension and add it to your project as an
existing class.

To do per user I am storing it using
System.Environment.GetFolderPath(Environment.Speci alFolder.ApplicationData)
& "\ApplicationName\SettingsFileName.xml"

on XP this stores it in

c:\documents and settings\<curuser>\Application
Data\ApplicationName\SettingsFileName.xml

Hope this helps you,

Shane
"mabond" <ma****@discussions.microsoft.com> wrote in message
news:5D**********************************@microsof t.com...
Hi all

This question is one of "theory" rather than a search for the specifics of
a
solution. I need some pointers as to how to proceed with my project.

Here goes.

My application allows the user to select from menu options. Some of the
menus allow the user, via an options form, to select parameters for the
display of reports. Those parameters will include things like the date
range,
the report type (detail or summary) and several others. All of this is
already coded and works exactly as required and designed.

To develop the application further I want to introduce what I call
"sticky"
profiles.

A user logs in ......
That user access the menus and option forms and makes selections for
his/her
report requirements.
That user logs out.

When that user logs in again (irrespective of how much later and how many
other users have logged in in the interim) I would like the application to
be
able to set the various option form objects (list boxes, date/time
pickers,
combo boxes etc.) to the last value selected by that user. And, in the
same
way, the application should set those options to the users last choice, at
any time a new instance of the option form is invoked during any session.

I think, perhaps I'm wrong, that this is quite a wide-open question, but
I'm
looking for guidance on methodology rather than a specific "do this or do
that" response.

Hoping someone out there may already have such a solution in use and can
suggest a way forward.

Regards

Michael Bond

Feb 25 '06 #3

P: n/a
Shane

Thanks for that. Points me in the right direction. Appreciate the help

Regards

Michael Bond

"Shane Story" wrote:
mabond,

I am using a class that I wrote to store user settings in an XML file.

You may read about this class here:
http://www.storyitc.com/cursite/default.htm

I have since updated it. The updated code can be found by going to

http://www.storyitc.com/codesamples

and clicking on clsPropertyManager (this is a text file, you need to copy
it into a file with a .vb extension and add it to your project as an
existing class.

To do per user I am storing it using
System.Environment.GetFolderPath(Environment.Speci alFolder.ApplicationData)
& "\ApplicationName\SettingsFileName.xml"

on XP this stores it in

c:\documents and settings\<curuser>\Application
Data\ApplicationName\SettingsFileName.xml

Hope this helps you,

Shane
"mabond" <ma****@discussions.microsoft.com> wrote in message
news:5D**********************************@microsof t.com...
Hi all

This question is one of "theory" rather than a search for the specifics of
a
solution. I need some pointers as to how to proceed with my project.

Here goes.

My application allows the user to select from menu options. Some of the
menus allow the user, via an options form, to select parameters for the
display of reports. Those parameters will include things like the date
range,
the report type (detail or summary) and several others. All of this is
already coded and works exactly as required and designed.

To develop the application further I want to introduce what I call
"sticky"
profiles.

A user logs in ......
That user access the menus and option forms and makes selections for
his/her
report requirements.
That user logs out.

When that user logs in again (irrespective of how much later and how many
other users have logged in in the interim) I would like the application to
be
able to set the various option form objects (list boxes, date/time
pickers,
combo boxes etc.) to the last value selected by that user. And, in the
same
way, the application should set those options to the users last choice, at
any time a new instance of the option form is invoked during any session.

I think, perhaps I'm wrong, that this is quite a wide-open question, but
I'm
looking for guidance on methodology rather than a specific "do this or do
that" response.

Hoping someone out there may already have such a solution in use and can
suggest a way forward.

Regards

Michael Bond


Feb 27 '06 #4

P: n/a
Rinze

Thanks

This gives me a good start

Regards

Michael Bond
"C-Services Holland b.v." wrote:
mabond wrote:
Hi all

A user logs in ......
That user access the menus and option forms and makes selections for his/her
report requirements.
That user logs out.

When that user logs in again (irrespective of how much later and how many
other users have logged in in the interim) I would like the application to be
able to set the various option form objects (list boxes, date/time pickers,
combo boxes etc.) to the last value selected by that user. And, in the same
way, the application should set those options to the users last choice, at
any time a new instance of the option form is invoked during any session.

Michael Bond


Assuming the 'user logs on' means logging into windows, you could
concider storing the settings in the registry since all users have their
own registry (hkey_current_user) (not Win9x AFAIK). This is the way I do
it for one of our applications to store some per user settings.

If you mean logging into your application you'll probably have to use
some kind of database/XML to store the settings in. Be it a table in an
existing database (of your app) or a seperate new one is your decision.

You'll just need to remember to store the settings when the user closes
the form.
--
Rinze van Huizen
C-Services Holland b.v

Feb 27 '06 #5

P: n/a
You're welcome.

The other issue that my class solved was the ability to just give it a
filename, that way if you had two exe's or a dll and exe in your solution
and wanted them to use one setting file, it is easy.

-Shane
"mabond" <ma****@discussions.microsoft.com> wrote in message
news:7C**********************************@microsof t.com...
Shane

Thanks for that. Points me in the right direction. Appreciate the help

Regards

Michael Bond

"Shane Story" wrote:
mabond,

I am using a class that I wrote to store user settings in an XML file.

You may read about this class here:
http://www.storyitc.com/cursite/default.htm

I have since updated it. The updated code can be found by going to

http://www.storyitc.com/codesamples

and clicking on clsPropertyManager (this is a text file, you need to
copy
it into a file with a .vb extension and add it to your project as an
existing class.

To do per user I am storing it using
System.Environment.GetFolderPath(Environment.Speci alFolder.ApplicationData)
& "\ApplicationName\SettingsFileName.xml"

on XP this stores it in

c:\documents and settings\<curuser>\Application
Data\ApplicationName\SettingsFileName.xml

Hope this helps you,

Shane
"mabond" <ma****@discussions.microsoft.com> wrote in message
news:5D**********************************@microsof t.com...
> Hi all
>
> This question is one of "theory" rather than a search for the specifics
> of
> a
> solution. I need some pointers as to how to proceed with my project.
>
> Here goes.
>
> My application allows the user to select from menu options. Some of the
> menus allow the user, via an options form, to select parameters for the
> display of reports. Those parameters will include things like the date
> range,
> the report type (detail or summary) and several others. All of this is
> already coded and works exactly as required and designed.
>
> To develop the application further I want to introduce what I call
> "sticky"
> profiles.
>
> A user logs in ......
> That user access the menus and option forms and makes selections for
> his/her
> report requirements.
> That user logs out.
>
> When that user logs in again (irrespective of how much later and how
> many
> other users have logged in in the interim) I would like the application
> to
> be
> able to set the various option form objects (list boxes, date/time
> pickers,
> combo boxes etc.) to the last value selected by that user. And, in the
> same
> way, the application should set those options to the users last choice,
> at
> any time a new instance of the option form is invoked during any
> session.
>
> I think, perhaps I'm wrong, that this is quite a wide-open question,
> but
> I'm
> looking for guidance on methodology rather than a specific "do this or
> do
> that" response.
>
> Hoping someone out there may already have such a solution in use and
> can
> suggest a way forward.
>
> Regards
>
> Michael Bond


Feb 27 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.