Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using 'dot' notation

Status
Not open for further replies.

RobertMottram

Programmer
Apr 25, 2002
39
GB
Most functions in VB now use what I am calling the . notation for example recordset.new and recordset.close etc
I wanted to right my on functions that work in this way.
I have tried to find out, but as I don't know what this is called I did not what to seach under!
If any one could give me some advice, point my in the right direction of some pages that could help or even tell me what this is called so I could seac the web for some information I would be very greatful

Thank you very much for any help you may be able to give

Rob
 
It depends what your trying to do. If you want to make a DLL, and reference it this way, you would need to make the DLL, with functions such as Get Property and Set Property, as well as public functions. You then reference these to your project and call them with.

Dim MyInterface as DLLProjectName.DLLClassName

THen in code it would be

MyInterface = New DllProjectName.DLLClassName
tmpSting = MyInterface.SubName(Values, , , )

Or if you don't want to create a DLL, then add a class module to your program and call it in much the same way

Dim MyInterface as ProjectName.ClassName

MyInterface = New ProjectName.ClassName
tmpSting = MyInterface.SubName(Values, , , )
Craig, mailto:sander@cogeco.ca

Remember not to name the Lambs...
It only makes the chops harder to swallow
 
Thanks very much for that. It is so simple as well. I feel a little stupid not being able to work it out!

Thanks again

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top