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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

withevents in VB to VFP..

Status
Not open for further replies.

cnguyen

Programmer
Dec 15, 2002
21
0
0
US
Hi;
I want to convert these line of code in VB below to VFP 8.0 please help;
thank you;
cuong.


dim withevents otest as Cotest
......
Private sub form_load()
set otest = new cotest
end sub
 
You'll want something like:
Code:
local loTest as Cotest
loTest=CreateObject("CoTest")

What is CoTest? Is it from a DLL where you've just been given sample VB code?

If this code is running on a form then remember that in VFP you have the ability to create the object as a property of the form. In VB you had to create a private module-level variable.

Geoff Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top