Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Automation Server: can't see my form
Message
 
 
To
29/12/2010 12:04:58
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01494109
Message ID:
01494115
Views:
90
>Where is the READ EVENTS command?

Craig,

Thanks for replying to my posting.

I used the VFP application wizard to create the framework for this app. The framework includes an app_application class derived from _application. The _application.ReadEvents method executes the READ EVENTS command.

How the files created by the VFP application wizard are supposed to work to support the user app has never been clear to me.

Jim

>
>
>>I'm new to using VFP to build a COM server.
>>
>>A VFP DLL server seems pretty straight forward. But, since I want my server to be able to interact with the user via a form, I understand that I need to create my VFP server as an EXE.
>>
>>I have used VFP 9 new application wizard to create the framework for my VFP EXE COM. I have added two files in this application. Right now, the content of these files is just test code to work out the strategy.
>>
>>The first file is a simple form (FrmTestFormFromCOM) that just displays a message, along with an OK button whose Click method releases the form.
>>
>>The 2nd file is a PRG file where I define the class that I am exposing. Here is the test code in that file
>>
>>
>>DEFINE CLASS PatVisitsDat AS Custom OLEPUBLIC
>>	
>>PROCEDURE GetDatFilesFromPatVisits (sDataSource AS String) AS Variant 
>>
>>   CREATE DATABASE "C:\Temp\WorkingDB.dbc"
>>		
>>   MESSAGEBOX("Before do form")
>>   DO FORM FrmTestFormFromCOM TO lResult
>>   MESSAGEBOX("After do form")
>>   CLOSE DATABASES 
>>   MESSAGEBOX("After Close Databases")		
>>   DELETE DATABASE "C:\Temp\WorkingDB.dbc" DELETETABLES
>>   RETURN 
>>ENDPROC
>>
>>ENDDEFINE
>>
>>
>>In the form's Init method, I have also added a MessageBox() call.
>>I then build the project as an EXE COM and register it.
>>
>>In a separate VFP form, I create test code that instantiates my server and calls the GetDatFilesFromPatVisits() method.
>>When I run the test code, I see all of the MesageBox messages including the one in the form. I also get a message asking if I really want to delete the database. But, I never see the form.
>>Apparently the form has run and was released, but I don't see anything.
>>
>>The VFP documentation is very vague about how to create a VFP EXE COM application.
>>
>>Thanks in advance for your help.
>>Jim
Previous
Reply
Map
View

Click here to load this message in the networking platform