Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FindWindow Problems
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00369262
Message ID:
00369281
Vues:
16
Hello George,

I wanted to E Mail to you direct, but thought best not. I was hoping you would reply. I am very positive its MS Desktops. I ran the test in various combinations, went to Home Depot, came back and re-ran the test. Basically unloaded MS Desktop. Opened two instances of VFP. Set _SCREEN.CAPTION = '' in one. Left the other app named 'Microsoft Visual Foxpro'. Tested. Changed captions around. Everything ran fine. Loaded MS Desktop and began getting 0

Also it does not matter which desktop the Foxpro application is running in. It always returns 0. Except for the situation I stated in last message.

It seems to be a VFP Problem because I can interogate MS Desktops and Wordpad ok.

As I looked around in past threads, UT KB, WIKI I noticed various combinations of how to do the declare and the FindWindows call. The two biggest differences were the following. I tried both neither one worked any different. I do understand passing params by ref VS passing by Value.


===========(1)=================
DECLARE integer FindWindow ;
IN WIN32API ;
STRING @nNull, ;
STRING @cWinName
nClass = 0
cWinName = 'Microsoft Visual Foxpro'
? FINDWINDOW(nClass, @cWinName)

===========(2)=================
DECLARE integer FindWindow ;
IN WIN32API ;
STRING nNull, ;
STRING cWinName
nClass = 0
cWinName = 'Microsoft Visual Foxpro'
? FINDWINDOW(nClass, cWinName)



>>I have found one situation that gets in the way and causes the API funtion findwindow() to always return 0 except when the app that it is being run in is the app with the window name being sought, which is useless.
>>
>>I use dual monitors with NT 2000 and........ MS Desktops from the NT 4.0 Resource Kit. MS Desktops is a Virtual Desktop Manager. There are a couple more Virtual Desktop Managers that ship with the Resource Kit and yes I expect there are updates. I am thinking that there is another that ships with www.stardock.com Dual Monitors with a Virtual Desktop is the best thing since sliced bread IMO and they are very common on Linux GUI's. I say linux because I suspect the idea will set in on Windows and become more popular. I have not had any other problems at all using this app other than using this API function.
>>
>>Does anyone know of another API Function or combination of API functions that gets to the same answer or is there another set of functions that should be accessed in this kind of enviroment. If possible I would like to harden somethings I am writing to cover the situation I am currently using.
>
>Ron,
>
>I don't know if this will address the problem, but FindWindow() needs an exact match of either the title bar or class name. Further, it is case sensitive. Most programs have dynamic title bars, and the class name is subject to change.
>
>I've written a small function (Is_Run32()) to work around this problem by checking for the known portion of the title bar. It's in the UT download section (under Win32 and other APIs) and titled "Is a Windows Application Running?".
What ben makes tracks for what wil be. Words in the air pirnt foot steps on the groun for us to put our feet in to.

Riddley Walker
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform