Private and Public class modules from the same souce code??? 
Author Message
 Private and Public class modules from the same souce code???

I have some class modules that get used in both standard and ActiveX exe's.
In the standard exe's VB says the classes must be declared as Private.  In
the ActiveX exe's they are declared as Public - Not Creatable.  In all other
respects the classes are identical.  I would love to be able to use
identical source code for all applications (so that Visual Source Safe can
do its job and facilitate code reuse).  Does anyone know of a way to
accomplish this?  (I have tried using conditional compilation with a user
defined conditional compilation constant defined within the vbp but this
doesn't seem to work for the class attribute declarations.)

Any help would be greatly appreciated.

Kind regards,

Joel Brown
Mooseware Limited



Sun, 23 Sep 2001 03:00:00 GMT  
 Private and Public class modules from the same souce code???
If you compile those classes into their own ActiveX DLL. You can use
them in both cases.



Quote:
>I have some class modules that get used in both standard and ActiveX exe's.
>In the standard exe's VB says the classes must be declared as Private.  In
>the ActiveX exe's they are declared as Public - Not Creatable.  In all other
>respects the classes are identical.  I would love to be able to use
>identical source code for all applications (so that Visual Source Safe can
>do its job and facilitate code reuse).  Does anyone know of a way to
>accomplish this?  (I have tried using conditional compilation with a user
>defined conditional compilation constant defined within the vbp but this
>doesn't seem to work for the class attribute declarations.)

>Any help would be greatly appreciated.

>Kind regards,

>Joel Brown
>Mooseware Limited




Sun, 23 Sep 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Placing an control in a class module as public or private property

2. Public Method in a class calling a private method in same class yields ByRef error

3. Public WithEvents Scope Limited To Module So Private?

4. VB5: Option Private Module vs Public

5. Using a UDT in a Class method, how to make a class module public

6. Public or Private instance of class ?

7. Friend vs Private class and public

8. Are class modules private?

9. Can a class module have private properties?

10. Q: Code Module vs UserControl (Form, Class) module.

11. Q: Code Module vs UserControl (Form, Class) module.

12. Q: Code Module vs UserControl (Form, Class) module.

 

 
Powered by phpBB® Forum Software