Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Top Level Form needs focus..
Message
From
01/09/2000 18:50:08
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00411754
Message ID:
00412016
Views:
15
Ed,

Thanks for the code! George's sample also worked as advertised but I appreciate having you post another way to do what I want. Much appreciated...

I'm finding myself wanting to dig a little deeper as a result of what you guys post. Must be the control freak in me. <g>

Thanks again!!

Best,

DD


>>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.
Best,


DD

A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform