Connecting Tech Pros Worldwide Forums | Help | Site Map

Control modifiers

mikejs2000
Guest
 
Posts: n/a
#1: Mar 20 '06
Hi All,

I have a problem with inherited forms, In the book im working for I am being
told to change the modifier from Assembly to Family, I dont know if it it the
version of VB.Net I have but my modifier combo comes with Public, Protected,
Protected Friend, Friend etc no mention of Assembly or Family. Where am I
going wrong? and if this is ok which option should I select in the modifier
combo to make the inherant forms work as I did set them to public and when I
opend the inherited form most of the properties where greyed out, and all my
code stated that the control did not exist.

Mike J. Soames

José Manuel Agüero
Guest
 
Posts: n/a
#2: Mar 20 '06

re: Control modifiers


Hello mikejs2000,

I suppose the book is based on a prerelease version of Visual Studio ..NET. The access modifier Assembly may be the actual Friend (can be accessed from anywhere in your assembly), and Family may be Protected (can be accessed by any class that inherits from yours).

I have no experience with inherited forms, but I suppose that the form must be declared public if it is in another project. The properties and methods should be public or protected.

Regards.


"mikejs2000" <mikejs2000@discussions.microsoft.com> escribió en el mensaje news:5177C0FC-B490-4860-8384-93B716357618@microsoft.com...
| Hi All,
|
| I have a problem with inherited forms, In the book im working for I am being
| told to change the modifier from Assembly to Family, I dont know if it it the
| version of VB.Net I have but my modifier combo comes with Public, Protected,
| Protected Friend, Friend etc no mention of Assembly or Family. Where am I
| going wrong? and if this is ok which option should I select in the modifier
| combo to make the inherant forms work as I did set them to public and when I
| opend the inherited form most of the properties where greyed out, and all my
| code stated that the control did not exist.
|
| Mike J. Soames
Carlos J. Quintero [VB MVP]
Guest
 
Posts: n/a
#3: Mar 21 '06

re: Control modifiers


Hi, the .NET Framework names are "Assembly", "Family", etc. These names are
translated for each language and so VB.NET uses "Friend", "Protected", etc.
while C# used "internal", "protected", etc. There are some type converters
or attributes in the design-time architecture and the CodeDoms that handle
this according to the project language.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com


"mikejs2000" <mikejs2000@discussions.microsoft.com> escribió en el mensaje
news:5177C0FC-B490-4860-8384-93B716357618@microsoft.com...[color=blue]
> Hi All,
>
> I have a problem with inherited forms, In the book im working for I am
> being
> told to change the modifier from Assembly to Family, I dont know if it it
> the
> version of VB.Net I have but my modifier combo comes with Public,
> Protected,
> Protected Friend, Friend etc no mention of Assembly or Family. Where am I
> going wrong? and if this is ok which option should I select in the
> modifier
> combo to make the inherant forms work as I did set them to public and when
> I
> opend the inherited form most of the properties where greyed out, and all
> my
> code stated that the control did not exist.
>
> Mike J. Soames[/color]


Closed Thread


Similar Visual Basic .NET bytes