Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bring Excel to front
Message
From
14/08/2013 07:45:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
13/08/2013 08:27:06
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01580013
Message ID:
01580453
Views:
40
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)
Previous
Reply
Map
View

Click here to load this message in the networking platform