Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bring Excel to front
Message
De
14/08/2013 07:45:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
13/08/2013 08:27:06
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01580013
Message ID:
01580453
Vues:
39
The article Naomi referred to is here:

http://forum.foxclub.ru/read.php?32,177182,258927#msg-258927

With Google Translate, I could understand it reasonably well. My own adaptation of the code is as follows:
* Bring Excel windows to foreground (doesn't work...)
LOCAL loShell
loShell = CreateObject ("WScript.Shell")
IF loShell.AppActivate (loExcel.Caption) = .T.
	* loShell.SendKeys ("% ~")
	* Shown instance of Excel to the fore
	# DEFINE xlMinimized -4140
	# DEFINE xlMaximized -4137

	loExcel.WindowState = xlMinimized && displace window
	loExcel.WindowState = xlMaximized && Expand the window, leading to its activation
ELSE
	MessageBox ("Application " + loExcel.Caption + " not found")
ENDIF
>Hilmar -
>
>Could you post the code you used to accomplish this? I, too, am interested in this.
>
>Thanks,
>
>Jim
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform