Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to switch focus between vfp window and desktop window ...

Status
Not open for further replies.

alwi

Programmer
Aug 17, 2002
10
ID
Hi guys,
How to get focus from Other app window to Vfp app window.
I lost focus when running dos application in vfp application window.

Any help will ber appreciated

thanks in advance
Alwi
 
Local lnHWND
lnHWND = _screen.hwnd
DECLARE Long BringWindowToTop in Win32API Long
DECLARE Long ShowWindow in Win32API Long, Long
IF m.lnHWND >0
BringWindowToTop(m.lnHWND)
ShowWindow(m.lnHWND,3) &&SW_MAXIMIZE 3
ENDIF

*!* IF you are using an earlier version of VFP you
*!* can use FindWindow to get the handle to the _screen
*!* Local lcTitle
*!* lcTitle = _screen.Caption
*!* DECLARE Long FindWindow in Win32API String, String
*!* lnHWND = FindWindow(null,m.lcTitle)


Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top