Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to auto restore Fox Dos (full screen) from VFP.
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Titre:
Trying to auto restore Fox Dos (full screen) from VFP.
Divers
Thread ID:
00798176
Message ID:
00798176
Vues:
84
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?
censored.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform