Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DoEvents, ActiveX, AutoYield
Message
From
01/06/2001 06:46:38
 
 
To
01/06/2001 04:12:23
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00513614
Message ID:
00513651
Views:
17
This message has been marked as the solution to the initial question of the thread.
Hi!

This could be solved 2 ways.
1 is show the wait window or use of inkey() with keyboard command before it. Inkey wayts for input, so it also fires all otehr events.

Another is to set the AutoYield to .T. temporarily in the loop, than restore it back. As far as I know, .F. for AutoYield is required for visual ActiveX controls for correct events processing chain when user interacts with visual ActiveX. I guess it is not required for "MSWinsck.ocx".

HTH.

>Hello Everybody !
>
>In my application I have two forms :
>-chat (main)
>-transfer
>In "chat" form I have an ActiveX "MSWinsck.ocx" with the function to send/get commands to/from remote PCs on the network . The "MSWinsck.ocx" sends data and when receives the answer stores the answer in a table field, called "result" .
>In "transfer" I have a method , "launch" , in which I call "MSWinsck.ocx" to send data . To wait until the "MSWinsck.ocx" receives the answer I have (in this "launch" method) a "do while ..." procedure which contains "DoEvents" to be able to interrupt the process.
>THE PROBLEM IS that the response from the remote PC doesn't come back . Could this be because VFP is executing the "do while... " procedure and doesn't "see" the other commands that should be executed ("MSWinsck.ocx" functions) ? Still I have the "DoEvents" which should execute pending commands .
>I read in Help that for an application to execute pending commands the application should have the AutoYield property set to .T. (default) , but , if it contains ActiveX objects , then AutoYield should be set to .F. . So , finally, what should I do ?
>
>ANY help is WELCOME !
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform