Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to auto restore Fox Dos (full screen) from VFP.
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00798176
Message ID:
00798326
Views:
44
Not an API guy hence not a solution in API.

Try

KEYBOARD '{ALT+TAB}'

Can work if only two application is open.

Aashish

>I have a Fox for DOS App that uses the RUN command to start a VFP app (to do some printing of labels) at one site if the Fox for DOS App is running Full Screen, then the transition to VFP is not sucessful and I have to use Win32 SetForegroundWindow to get VFP to stay in the foreground.
>
>When VFP is finished, control should automatically return to the Fox for DOS App. This does not happen. I've tried
oWSH = CreateObject( "WScript.Shell" )
>oWSH.AppActivate( "Command Prompt - FOXPROX" )
>
>Also tried
DECLARE INTEGER GetLastError IN WIN32API
>DECLARE INTEGER FindWindow IN WIN32API STRING, STRING
>DECLARE INTEGER SetForegroundWindow IN WIN32API INTEGER
>DECLARE INTEGER ShowWindow IN WIN32API INTEGER, INTEGER
>
>cWindowTitle = "Command Prompt - FOXPROX"
>hDOSApp = FindWindow( .NULL., cWindowTitle + CHR(0) )
>
>IF hDOSApp == 0 THEN
>	MESSAGEBOX( "Unable to automatically maximize your DOS application. " ;
>		+ TRANSFORM( GetLastError() ) ;
>		, 64 + 0 ;
>		, "SmartShop" )
>	QUIT
>ENDIF
>
>iResult1 = ShowWindow( hDOSApp, 1 )
>iResult2 = SetForegroundWindow( hDOSApp )
The MessageBox displayed above shows error number 127 (Unable to find procedure). This works when done from the command window.
>
>Does anyone have any suggestions?
--
--
Aashish Sharma
Tele Nos: +1-201-490-5405
Mobile: +91-9821053938
E-Mail:
aashish@aashishsharma.com
write2aashish@gmail.com

You better believe in yourself... if you don't, who else will ?
TODAY is a gift, that's why it's called PRESENT
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform