Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem using a DLL
Message
From
24/11/1997 11:49:14
Jay Shepherd
Construction DataFax, Inc.
Montevallo, Alabama, United States
 
 
To
24/11/1997 11:05:06
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00061055
Message ID:
00061947
Views:
41
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform