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."
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