Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COM object and Modal form
Message
From
29/11/2010 19:57:06
 
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01490949
Message ID:
01490992
Views:
66
Not modal in respect to VFP. The form is instantiated within a method in the VFP COM object.

I have since changed the code that I included in my original post and the form appears to be modal and has the focus, but as soon as I click anywhere on the form .NET code execution resumes immediately. The form consists of a grid and an 'OK' button and 'Cancel' button. When 'Ok' is clicked a 1 is returned and when 'Cancel is clicked a 0 is returned.

Here is the .NET code. The code after the 'if' is the code that is running before I have a chance to click on one of the buttons on the VFP form:

Dim oCom as New vfpcom.comobj

if oCom.method(instantiates VFP form) = 1 then
do this code
endif

This is the code in the VFP COM Object method:

Public oForm
oForm = CreateObject("class.form")
_Screen.Visible = .F.
oForm.custommethod(parameter1,parameter2,parameter3,parameter4)

This is the code in the form.custommethod:

This.Hide()
This.Show(1)

Thanks again for any and all help.

Ken
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform