Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COM object and Modal form
Message
De
29/11/2010 19:57:06
 
 
À
29/11/2010 16:54:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01490949
Message ID:
01490992
Vues:
68
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform