Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Instantiate A VFP DLL In VB
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00476996
Message ID:
00477008
Vues:
19
>Can anyone tell me how to instantiate and call a VFP DLL in VB?
>
>Thanks

Kevin,

In order to use VFP Component Object Model (or any other Component Object Model)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:

Early binding:
Option Explicit
Dim oTest As myVFPdll.myVFPclass
Late binding:
Option Explicit
Dim oTest As Object
Set oTest = New myVFPclass
There is a lot of info on the subject in MSDN Library, for example the following links in will tell you the difference between early and late binding.

http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbconoptimizingobjects.htm
http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbconhowbindingaffectsolecomponentperformance.htm
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform