474,047 Members | 3,148 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic UserScopedSetti ngs

Is there a way to dynamically create user scoped settings? For example, a
lookup window inside an MDI application that is called by multiple forms and
needs to maintain it's size and position based on the MDI child form from
which it was called.
Feb 8 '06 #1
6 2024
Hi lloyduh234,

Thanks for your post.

Do you use .Net1.1 or .Net2.0? In .Net2.0, winform provided user scoped and
application scoped setting configuration file. For more information, please
refer to the link below:
http://msdn2.microsoft.com/en-us/library/c9db58th.aspx

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Feb 9 '06 #2
Thanks.
I'm using .Net 2.0 (c#). I realize there exists user scoped setting
configuration files. All the examples that I see show a somewhat static
wrapper class. I'm wondering if there are any examples of dynamic creation.
For example, I have a lookup window that needs to save it's position, size,
and grid column widths. The lookup window is called from multiple forms, and
presents different data for each form. I'd like to be able to persist
settings based on who called the lookup form.

""Jeffrey Tan[MSFT]"" wrote:
Hi lloyduh234,

Thanks for your post.

Do you use .Net1.1 or .Net2.0? In .Net2.0, winform provided user scoped and
application scoped setting configuration file. For more information, please
refer to the link below:
http://msdn2.microsoft.com/en-us/library/c9db58th.aspx

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Feb 9 '06 #3
Hi lloyduh234,

Thanks for your feedback.

I am not sure if I understand your scenario completely. It seems that you
want to persist the setting based on different form not based on the
different windows account, yes?

This requirement is somewhat like the Session concept in Asp.net. However,
there is no any build-in support for this in .Net winform.

If you want to do this, you have to implement some customized code to store
different settings. We should maintain some identification information in
the calling form, so that the lookup window can query to distinguish these
the callers. For example, we can use certain constructor of lookup window
to pass in certain identification information, then we can create a config
file based on different identification passed in.

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Feb 10 '06 #4
Thanks.
What I tried was modifying the FormSettings example under the MSDN
ApplicationSett ingsBaseClass example. In the constructor, I passed a string
that identifies the form name (_formName).
I then did the following:

[UserScopedSetti ng()]
[DefaultSettingV alueAttribute(" 0, 0")'
public point FormLocation
{
get { return (Point)(this[_formName + "Location"]); }
set { this[_formName + "Location"] = value; }
}

This way, I could use one wrapper class across my entire application, and
just identify the settings by the calling form.

Should this have worked?

Thanks!

""Jeffrey Tan[MSFT]"" wrote:
Hi lloyduh234,

Thanks for your feedback.

I am not sure if I understand your scenario completely. It seems that you
want to persist the setting based on different form not based on the
different windows account, yes?

This requirement is somewhat like the Session concept in Asp.net. However,
there is no any build-in support for this in .Net winform.

If you want to do this, you have to implement some customized code to store
different settings. We should maintain some identification information in
the calling form, so that the lookup window can query to distinguish these
the callers. For example, we can use certain constructor of lookup window
to pass in certain identification information, then we can create a config
file based on different identification passed in.

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Feb 10 '06 #5
Hi lloyduh234,

Yes, this should work. By doing this, each calling form will have an entry
in the user.config file, and whenever you access it, the corresponding
entry will return for the caller(since you have passed the correct calling
form name in the constructor)

If you still have anything unclear, please feel free to let me know. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Feb 13 '06 #6
Just curious if this worked for you? I'm trying to do a similar thing, but
cant get it happening.

"lloyduh234 " wrote:
Thanks.
What I tried was modifying the FormSettings example under the MSDN
ApplicationSett ingsBaseClass example. In the constructor, I passed a string
that identifies the form name (_formName).
I then did the following:

[UserScopedSetti ng()]
[DefaultSettingV alueAttribute(" 0, 0")'
public point FormLocation
{
get { return (Point)(this[_formName + "Location"]); }
set { this[_formName + "Location"] = value; }
}

This way, I could use one wrapper class across my entire application, and
just identify the settings by the calling form.

Should this have worked?

Thanks!

""Jeffrey Tan[MSFT]"" wrote:
Hi lloyduh234,

Thanks for your feedback.

I am not sure if I understand your scenario completely. It seems that you
want to persist the setting based on different form not based on the
different windows account, yes?

This requirement is somewhat like the Session concept in Asp.net. However,
there is no any build-in support for this in .Net winform.

If you want to do this, you have to implement some customized code to store
different settings. We should maintain some identification information in
the calling form, so that the lookup window can query to distinguish these
the callers. For example, we can use certain constructor of lookup window
to pass in certain identification information, then we can create a config
file based on different identification passed in.

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Apr 12 '06 #7

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

Similar topics

0
1907
by: Roel Wuyts | last post by:
CALL FOR CONTRIBUTIONS International Workshop on Revival of Dynamic Languages http://pico.vub.ac.be/~wdmeuter/RDL04/index.html (at OOPSLA2004, Vancouver, British Columbia, Canada, October 24-28, 200) Organization committee: Roel Wuyts (primary contact - roel.wuyts@ulb.ac.be), Gilad Bracha, Wolfgang De Meuter, Stéphane Ducasse and Oscar Nierstrasz.
0
2085
by: Pascal Costanza | last post by:
Dynamic Languages Day @ Vrije Universiteit Brussel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Monday, February 13, 2006, VUB Campus Etterbeek The VUB (Programming Technology Lab, System and Software Engineering Lab), ULB (deComp) and the Belgian Association for Dynamic Languages (BADL) are very pleased to invite you to a whole day of presentations about the programming languages Self, Smalltalk and Common Lisp by experts in...
5
2607
by: bearophileHUGS | last post by:
I often use Python to write small programs, in the range of 50-500 lines of code. For example to process some bioinformatics data, perform some data munging, to apply a randomized optimization algorithm to solve a certain messy problem, and many different things. For that I often use several general modules that I have written, like implementation of certain data structures, and small general "utility" functions/classes, plus of course...
0
12148
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11604
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
12036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
11145
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8701
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7876
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
5423
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 we have to send another system
3
3976
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.