Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP as COM freezes application.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00390022
Message ID:
00390299
Vues:
9
>>AutoCAD is waiting on the VFP app to return control because the COM interface - you made a COM call, and until that COM reference terminates the invocation and returns, AutoCAD is blocked.
>
>That's what I was afraid of. I'm trying to display a form for the user, but they need to be able to move the form around and see different parts of the AutoCad screen. I tried justing showing the form as modal and not using READ EVENTS, but the form just flashes and goes away.
>
>Is there anyway around it or am I stuck with it? I can create the same test in VB as modal form and compiling to a .dll and it works fine.
>
>Thanks.

The reason it is going away is because you set it as Top-level. VFP coerces the Windowtype property to non-modal during instantiation when you set the ShowWindow to Top-level.

Try creating two methods in your COM server. The first will create the form and leave it there. I don't think you need the modalness or the READ EVENTS. Be sure not to link it to anything that will go out of scope within the method or the form will go away. The second method will loop through the _Screen.Forms collection and clear out the form. You can call this from AutoCad when you don't need it anymore.

I think this will work.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform