Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't display a form from within a VFP 6.0 COM .dll
Message
De
04/05/1999 14:27:12
 
 
À
04/05/1999 13:22:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00215053
Message ID:
00215082
Vues:
24
>Any COM experts out there?
>
>I've created a very simple VFP 6.0 .dll component. I can call my .dll from VB or Excel, but I can't display a form or issue the READ EVENTS command without generating the following error:
>
>Run-time error '1031':
>User interface operation not allowed at tis time.
>
>Interestingly, I have searched the entire Visual Studio 6.0/MSDN library for this error, and there is no reference to an Error code 1031 anywhere within the several megabytes of help.
>
>HOWEVER, a search for the text string portion of today's error retrieved Visual FoxPro Error 2031, which occurs, allegedly, when a modal process (such as form, or READ EVENTS command) is issued from an .EXE-based COM component. According to the VFP online help, .dll-based COM objects ALWAYS allow modal events.
>
>What am I doing wrong?

VFP COM Object aren't ActiveX controls; an in-process COM server can't have any UI code in it; while an out-of-process server can, it won't participate in the event loop of the application that references it.

>Why can't I display a form from within a .dll based VFP com component?

Because it's an in-process OLE Automation server and not an ActiveX control.

>Why doesn't the help file discuss error code 1031?

I have no idea.

>
>Extra credit:
>Define the universe (2 points)
>Give three examples (5 points)
>
>Thanks,
>
>>A<
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform