Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Public Constants in ActiveX Document DLL
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Threshold
Squire

USA
44 Posts

Posted - Apr 15 2005 :  6:30:01 PM  Show Profile  Reply with Quote
I'm working on an ActiveX Document DLL (basically a library of classes) but I would like to give the end programmer access to some constants. As far as I know and have experienced classes cannot define public constants and public constants in modules are hidden from the end programmer. I did notice that the DirectX 8 library does, in fact, give me access to many constants. How can I achieve the same thing? Is there a better/equivalent alternative?

Life is short. They say "don't waste it, have fun." They're right, don't waste it...but DO redefine "fun."

Eric Coleman
Gladiator

USA
811 Posts

Posted - Apr 16 2005 :  3:26:54 PM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
You could use public properties to simulate constants. Simply make it "read only", as in only have "Get" statements and no "Let" statments. Public Property Get MyValue() As String: MyValue="hello world" :End Property

Go to Top of Page

Threshold
Squire

USA
44 Posts

Posted - Apr 16 2005 :  7:21:58 PM  Show Profile  Reply with Quote
Thanks! I'll look into that.

Life is short. They say "don't waste it, have fun." They're right, don't waste it...but DO redefine "fun."
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.11 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.