Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WSH and Taking control back from active application
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00425183
Message ID:
00425231
Vues:
15
Dimitrios,

I'm going to have to guess at the source of these problems. Under the circumstances and based on personal experience and knowledge, however, I'd have to say that the probability of my being correct is pretty good.

Let's first address the problem of why the WScript.Shell's Popup method doesn't time out under VFP.

One of the things that VFP does differently than other Windows applications is its processing of messages from Windows. Every application has a window, visible or not, that has a function (generally referred to as WindProc or WindowProc) that has the responsibility of processing messages from Windows. This includes key presses, mouse movement and so on. I believe that this is the source of the problem.

Applying this to the problem with Popup, I'd guess that what happens is that a call to the Windows API function MessageBox() is somehow wrapped and timed. When the alloted time expires, the caller sends a message indicating that the window should close as if the user canceled the call.

Since VFP doesn't process its messages in a standard manner (which can see this in problems with ActiveX controls supporting containership), it may improperly process the message. This would also apply to the SendKeys method when the target application is an VFP app.

Hopefully, if I'm incorrect about this, either my co-author (who knows a good deal more about this than I) or perhaps someone from Microsoft will jump in and correct me here.

Lastly, please call me George.< s >
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform