Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Top level form does not get the focus
Message
From
06/03/2002 15:04:52
 
 
To
06/03/2002 14:28:24
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00627628
Message ID:
00629215
Views:
19
>OK, I didn't wait till tomorrow.
>
>* Here is the code I think will work *
>
>ON SHUTDOWN
>_screen.AddProperty( "awf" , .null. )
>Declare Integer GetActiveWindow In USER32.Dll
>
>
>Do Form FTP Name Main
>* no extra code here *
>_screen.awf=GetActiveWindow()
>
>
>* this shall be the last code before read events
>Declare SHORT SetForegroundWindow In USER32.Dll Integer HWnd
>If .Not. Isnull(_Screen.awf)
> If SetForegroundWindow(_screen.awf) # 0
> _screen.awf = .Null.
> main.caption = "I am on top"
> * MESSAGEBOX('Success')
> Else
> * MESSAGEBOX('Failure')
> Endif
>Endif
>Read Events
>QUIT
>
>* end *
>
>Try to mix this into your code.
>
>Shall I send you my complete test code as email?

That doesn't change anything. It goes into failure.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform