Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
USING VFP DLL IN VB
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00471556
Message ID:
00471727
Vues:
29
>>Hi All
>>I have made a single threaded Com server Dll with a Class
>>If I use it in VFP it Works like a charms
>>But my VB fellow can't use it
>>How can he use it in VB.
>>
>>My dll name is comvb.dll and have a methode name meval in it
>>I use it like this
>>otest = CreateObject('comvb.vbeval')
>>? otest.meval('1<2') && return .t.
>>I have made this dll for the vb programmer, He can use the Eval() function in it
>>
>>Thanks for the tips
>>
>>Benoit
>
>Benoit, did you (or him) add your VFP COM object type library to VB project?
>
>In order to use VFP COM (or any other COM)in VB the corresponding type library should be added to the project through Project/References menu option (find it in the list and put the checkmark next to it) so it will be available in your VB project.
>
>Then you can instantiate it for example from VB form something like this:
>
>Option Explicit
>Public oTest As Object
>
>Private Sub Form_Initialize()
> Set oTest = New vbeval
>End Sub

If you have it in the references then it is best that you take advantage of early binding by declaring the variable of the specific object type. Say:

Dim oTest As myVFPClass.vbeval
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform