Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem using a DLL
Message
De
24/11/1997 11:49:14
Jay Shepherd
Construction DataFax, Inc.
Montevallo, Alabama, États-Unis
 
 
À
24/11/1997 11:05:06
Information générale
Forum:
Visual Basic
Catégorie:
Contrôles ActiveX
Divers
Thread ID:
00061055
Message ID:
00061947
Vues:
44
>>You could declare your variable as
>>
>> Dim MyProperty as MyServer.MyFormClass
>>
>>And you could direcly instiance your object by using :
>> Dim MyProperty as new MyFormClass
>>Or
>> Dim MyProperty as new MyServer.MyFormClass
>
>I can now execute the dim line. However, the set line returns "Invalid use of New keyword".
>
>Dim MyProperty As fournier.maforme
>Set MyProperty = New fournier.maforme

You can use VB's Createobject() too..

I found this on the MSDN site that might help you (Use Visual FoxPro 5.0 as an OLE Server):

Visual Basic-Command1.Click()

You must declare and specify the variable as an Object Type prior to storing a reference to the OLE server because Visual Basic is a strongly typed language. The only other notable difference between VB and VFP syntax is the Set keyword when you assign a value to a variable. Also, the city, state, and county information can be assigned directly to the text box. It’s assumed that the Value Property will hold information directly assigned to a text box control:

Private Sub Command1_Click()
Dim o As Object
Set o = CreateObject("zip.ziplkup")
o.GetData (Screen.ActiveForm.txtZip)
Screen.ActiveForm.txtState = o.state
Screen.ActiveForm.txtCity = o.city
Screen.ActiveForm.txtCounty = o.county
End Sub

I'm not sure what version of VB they are talking about, but this might help.
Jay Shepherd
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform