|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Need a Friend, MaybeUsing VB6 with SP
If I use Friend instead of Public, what does it do for me for: (1) classes etc within a project (2) ActiveX.dll (3) ActiveX.exe I am confused. I think I understand that it impacts visibility, but when and where? "Bee" <B**@discussions.microsoft.com> wrote in message Friend means the property/method's scope is that of the *project*. It is news:2D0879D9-EC11-4E00-BE88-EC4E27B971B0@microsoft.com... > Using VB6 with SP > If I use Friend instead of Public, what does it do for me for: > (1) classes etc within a project > (2) ActiveX.dll > (3) ActiveX.exe > I am confused. > I think I understand that it impacts visibility, but when and where? NOT made public to consumers of your ActiveX component. IOW, other modules of that ActiveX project (which have a reference to your class) see the property or method. But, it is not public, so OTHER applications using your DLL or OCX don't see it. -- Mike > Using VB6 with SP It's visible within the project. Not usually> If I use Friend instead of Public, what does it do for me for: > (1) classes etc within a project > (2) ActiveX.dll > (3) ActiveX.exe > I am confused. > I think I understand that it impacts visibility, but when and where? > meaningful in an EXE, but in COM objects it allows you to have a function that's visible within the project without being visible in the public interface. "Bee" <B**@discussions.microsoft.com> wrote in message One more:news:2D0879D9-EC11-4E00-BE88-EC4E27B971B0@microsoft.com... > Using VB6 with SP > If I use Friend instead of Public, what does it do for me for: > (1) classes etc within a project > (2) ActiveX.dll > (3) ActiveX.exe > I am confused. > I think I understand that it impacts visibility, but when and where? If, in the IDE, Project1 is a standard exe, project2 is a user control, and the user control has a referance to a class, any properties or mehods declaired as friend in the class will be available to the usercontrol but not the exe form that has a usercontrol on it. This means the usercontrol has access to friend proceedures but the form in Project1 with a usercontrol on it does not. Always handy to have friends in class :-) Ivar Got it. Thanks
Show quoteHide quote "Bee" wrote: > Using VB6 with SP > If I use Friend instead of Public, what does it do for me for: > (1) classes etc within a project > (2) ActiveX.dll > (3) ActiveX.exe > I am confused. > I think I understand that it impacts visibility, but when and where? >
Public Thank You To Microsoft
Wrap a Long String Determining Available Paper Sizes on Printer vb6 closes with erro after I installed msdn oct 2001 Number Puzzle Subclassing a la Caton Using VBPRNDLG.DLLl Instead of Print Common Dialog Boxes VSM Wants Your Feedback Control Container Property - Why Use It? Does anybody know how to translate this C# code to VB6? |
|||||||||||||||||||||||