Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FindWindow() VFP from Word
Message
 
À
23/09/1998 08:55:58
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00139394
Message ID:
00139771
Vues:
84
>Hidy George,
>Agree :) There is one place I use classname though. Here is the scenario :
>-Invoke word
>-Immediately get its class from known title at that point
>-Wait till word finishes checking by class (title might have changed)
>Here I do :
* tcWaitWindowClass is saved from FindWindow(0,title)
>* and GetClassName()
>do while this.findwindowhandle(tcWaitWindowClass)<>0
>enddo
>release oWordDocument
>
>*Findwindowhandle
>lparameter tcWinClass
>DECLARE integer FindWindow in WIN32API string cNull, string cWinName
>nHWND = FindWindow(tcWinClass,0)
>clear dlls
>return nHWND
Being frankly I wouldn't do it this way if I coded it now. I'm dealing only with the one I invoked and this works (might it not :( ?). I didn't yet try isrun32 instead yet.

Hidy Cetin,

Hey, if it ain't broke, don't fix it. And I have a story (involving software) in this regard, that'll I'll share with anyone that asks.

Even with Is_Run32() there's a possibility that the wrong value will be return if it isn't supplied with enough information. Imagine a scenario where there are two instances of notepad open, if you call Is_Run32() with just "Notepad" as the parameter there's a 50% chance you'll get the right one. The more information you supply it, the more accurate the result will be.
George

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

Click here to load this message in the networking platform