Dear pple,can anyone kindly please teach me how to write a DDE application? i'm supposed to wri...
By ongtw
Is there anyone who knows how to access "Control Panel\Administrative Tools\Component Services\Compu...
By andywang01_yahoo_com
Liar Or Thief, Who Do You Choose ?Hi, I am running a POLE, please visit this page in the forums.http...
By kropes
Can somebody help me make an ActiveX control that I can insert on any form to make it stay on top?Th...
By nite
HELLO EVERYBODY!I am creating DLL that will be configured as COM+ component.In the DLL I have Public...
By glen711, 2 Comments
i know i m doing this thing wrong.. but i m desperate for answers.. if i found no soloution i have ...
By kirun, 5 Comments
HiI have a program that instansiates an ActiveX exe when it runs. Sometimes, if my program is busy, ...
By paulb, 7 Comments
hiwhy should we write and read the value of an activeX control property in Property Bag object?is it...
By vnramkumar, 1 Comments
can any one tell me how i can acess a server DLL from a Client Application .. suppose i have some DL...
By chander, 1 Comments
' Module:
Public g_strYourVariable As String
' User control:
Public Property Get YourVariable() As String
YourVariable = g_strYourVariable
End Property
Public Property Let YourVariable(ByVal strVar As String)
g_strYourVariable = strVar
End Property
axion_sa | Wed, 05 Dec 2007 13:39:00 GMT |
Go through the posted message thoroughly, it seems you did not understand what's the requirement.
Explanation of the above problem with an example ....
Everybody must have used vbCrLf to introduce a line feed in the string to be displayed.
Where does this vbCrLf come from, obviously from one of the 3 VB standard library. I don't remember at present but it is defined in VBA. Where ever it may it is easy to find through the object browser. Find it and you will notice that it comming from a Standard Module and not from a Class.
What axion_sa has mentioned is a Public String Property that is available only through the object of that particular class. He is correct if the requirement is that you want a public string property for an object.
But here what I want is that the string should not be part of any object (i.e., class) but should be avialable Globally like vbCrLf is avialable globally.
For this one needs a Standard module to be exposed from the ActiveX project. But the Standard module is public only within the ActiveX project and not out side. So how could one expose Standard modules from an ActiveX project. If one could do that he/she can expose a public string constant from the ActiveX project to other client app.
rajdivecha | Wed, 05 Dec 2007 13:40:00 GMT |
The correct way to do this would be to declare the constant in a Public Module,
however VB doesn't allow you to create such an animal, leaving you only with the option of creating a Global MultiUse Class Module and use Read-Only properties.
(as you've already discovered.
This is simply a limitation of VB, if you really need to create these constants in the correct way,
use Visual C to create the DLL instead.
Personally, I think using a Global MultiUse class module is a sufficient work-around as it gives you the functionality you require.
aaronyoung | Wed, 05 Dec 2007 13:42:00 GMT |