473,396 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Public User Object

I have a class library that has a form and MDI class. My applications
use this. Each application has a MDI form inherited from the MDI
class. Each form that is displayed from within the MDI form is
inherited from the class library form. In addition to all that I have
modules in the applications.

I need an object that is available to all to store user information.
So when the MDI form is loaded, I want the form to get the user
information. But the same user information needs to be available to
all other forms and from within the modules.

My user object is a class. I need this object to be created once and
public to all. Ideas anyone? Any help would be greatly appreciated.

Nov 21 '05 #1
1 1125
the good way :

you do not need public accessors at all , in the described situation you
could pass the user object as a parameter to the forms / modules ( avoid
modules , in a true VB.net project as they will result in VB6 like code in
the end .Net gives you the way todo things more OOP so try to use this
aproach instead )
if the object is a requirment for a other object ( always needed ) i would
pass it to the constructor

the easy way :

declare your class in a module and it is accessible
regards

Michel Posseth
"Paul" <pw****@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
I have a class library that has a form and MDI class. My applications
use this. Each application has a MDI form inherited from the MDI
class. Each form that is displayed from within the MDI form is
inherited from the class library form. In addition to all that I have
modules in the applications.

I need an object that is available to all to store user information.
So when the MDI form is loaded, I want the form to get the user
information. But the same user information needs to be available to
all other forms and from within the modules.

My user object is a class. I need this object to be created once and
public to all. Ideas anyone? Any help would be greatly appreciated.

Nov 21 '05 #2

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

Similar topics

1
by: Gary | last post by:
Hello guys! Bear with me,I am newbie. I am trying to limit the privileges of the user PUBLIC has as toughly as possible which means I want to go as far as I can then leave those MUST-HAVE...
3
by: Steve | last post by:
Visual Studio 2003 .NET / C# I have a treeview object on a form which acts as the main menu controller for my application. the treeview is always in sight, and the form it is on acts as the...
175
by: Ken Brady | last post by:
I'm on a team building some class libraries to be used by many other projects. Some members of our team insist that "All public methods should be virtual" just in case "anything needs to be...
2
by: Ekul | last post by:
I have an application that allows users to login and logout. I track how many users are logged in and when each individual is logged in. The application will not allow concurrent logins(let a...
4
by: louise raisbeck | last post by:
Resending this as own topic as didnt get answer from original. Would be grateful for a response from anyone that knows. Thanks. Hi there, I found your post really helpful..but i wondered if, once...
1
by: Will Gillen | last post by:
I know this has probably been asked before, but I can't seem to find a solid answer in any of the archives. First, before my question, please forgive my limited knowledge of the event lifecycle...
8
by: rk2008 | last post by:
I have an ASP.NET application, which needs to initialize a memory location and update it multiple times in different projects in the same solution. I have used a public static variable and I could...
17
by: Gerrit | last post by:
Hallo, In my application, the user must logon with a username and a password. In all the tables in my database, there is a field user. By saving new or changed records, the username is writed to...
5
by: =?Utf-8?B?VGVycnkgSG9sbGFuZA==?= | last post by:
I am developing 3-tiered application. I have and ASP UI, VB.Net Business Objects and a SQL ServerDB. I am encountering a problem that I have a mental block on and would appreciate some help. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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...
0
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...
0
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...
0
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,...

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.