Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Top Level Form needs focus..
Message
De
01/09/2000 18:21:24
 
 
À
01/09/2000 13:09:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00411754
Message ID:
00412014
Vues:
17
>Georeg,
>
>Understood.. George S. mentioned that he had seen a behaviorial change in a later build of VFP. Perhaps this is a "Windows Thang" and the developers are trying to make VFP more 'Windosey'. Barring that it's a bug IMO.
>

It is a Windows thang...you need to rely on a different API call - SetWindowPos() rather than ShowWindow():
DECLARE SHORT SetWindowPos IN USER32 ;
   INTEGER hWnd, ;
   INTEGER hWndInsertAfter, ;
   INTEGER x, ;
   INTEGER y, ;
   INTEGER cx, ;
   INTEGER cy, ;
   INTEGER uFlags
#DEFINE HWND_TOPMOST_WINDOW -1
#DEFINE SWP_NOMOVE 2
#DEFINE SWP_NOSIZE 1
#DEFINE SWP_SHOWWINDOW 0x40
#DEFINE SWP_BRINGTOTOP SWP_NOSIZE + SWP_NOMOVE + SWP_SHOWWINDOW
DECLARE INTEGER GetLastError IN WIN32API
*  I assume that nHwnd is the hWnd of the Form to bring to top
IF SetWindowPos(nHwnd,HWND_TOPMOST_WINDOW,0,0,0,0,SWP_BRINGTOTOP) # 0
   *  It worked
ELSE
   nWinErrorCOde = GetLastError()
   *  API fall down go boom
ENDIF
The behavior of ShowWindow is different under Win98/Win2K/WinME, and is documented as such in the July MSDN. THe above acts to activate the Window at its current size and make the window topmost under all platforms.

>Nothing Earth shaking but an annoyance none-the-less.
>
>Best,
>
>DD
>
>>>George, George (by George) has also noticed this and has recommended an API call. Sadly, none of your recommendations have worked so far.
>>>
>>DD,
>>
>>Hmmm...and SCREEN=OFF is in the config.fpw? You know I'd be the first to recommend an API solution if I thought it was appropriate. Here, however, something else is going on, and you've got me curious as to what it is.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform