473,322 Members | 1,846 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,322 software developers and data experts.

Access level for a property

I want to confirm my understanding about access modifier for property.

Assembly One contains:

Class One has Protected property Protected1_prop
Class Two has Friend property Friend2_prop
Class Three has Protected Friend property Protected_Friend3_prop
Class Four has Private property Private4_prop
Class Derived_One is a class derived from Class One of Assembly One
Class Derived_Two is a class derived from Class Two of Assembly One
Class Derived_Three is a class derived from Class Three of Assembly One
Class Derived_Four is a class derived from Class Four of Assembly One

Assembly Two contains:

Class Derived_One is a class derived from Class One of Assembly One
Class Derived_Two is a class derived from Class Two of Assembly One
Class Derived_Three is a class derived from Class Three of Assembly One
Class Derived_Four is a class derived from Class Four of Assembly One

Protected1_prop can be accessed by code in:
-Class One of Assembly One
-Class Derived_One of Assembly One
-Class Derived_One of Assembly Two

Friend2_prop can be accessed by code in:
-Assembly One

Protected_Friend3_prop can be accessed by code in:
-Assembly One
-Class Derived_Three of Assembly Two

Private4_prop can be accessed by code in:
-Class Four of Assembly One

It seems that Property Windows can only access Public properties.

Is that a way to declare a property of a custom windows control (control
inherited from existing windows control or composite control) so that only
the form containing the instance of that control can access that property.
Aug 27 '07 #1
1 1292
Peter wrote:
I want to confirm my understanding about access modifier for property.
<snip>

Your understanding is the same as mine so, hopefully, we're both right. :-)
It seems that Property Windows can only access Public properties.
No, they should handle the Protected ones as well.
Indeed, /many/ properties on the /standard/ Controls are inherited from
other classes, e.g. Location and Size come from the Control class.
Is that a way to declare a property of a custom windows control (control
inherited from existing windows control or composite control) so that only
the form containing the instance of that control can access that property.
Place the Control on the Form and make its Modifier "Private".

HTH,
Phill W.
Aug 28 '07 #2

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

Similar topics

6
by: Jon Davis | last post by:
I recently learned how to do an <OBJECT> alternative to <IFRAME> in current browsers using: <object id="extendedhtml" type="text/html" data="otherpage.html" width="250" height="400"></object> ...
14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
3
by: Vern | last post by:
I have a custom button control that compares the user security level to the buttons security level property. If the user level is greater than the button level, then the button is enabled, else it...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
10
by: Les Desser | last post by:
In article <fcebdacd-2bd8-4d07-93a8-8b69d3452f3e@s50g2000hsb.googlegroups.com>, The Frog <Mr.Frog.to.you@googlemail.comMon, 14 Apr 2008 00:45:10 writes Not sure if I quite follow that. 1....
7
by: sharsy | last post by:
Hi guys, I would like to setup a validation rule for a database in microsoft access that restricts data entry so that a certain field can only be filled in if another field has a specific answer...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
8
by: puzzlecracker | last post by:
/*1 not specified*/class { /*2 not specified*/ void Foo(){} } Will they, like in c++, default to private? Thanks
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.