Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to assure Excel on top
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00826248
Message ID:
00826252
Views:
22
>A project with some automation generates charts. In cases were the values are zero, the user wants a message. Without the messagebox, when oExcel becomes visible, the Excel application is on top of the VFP interface. Thats what I want.
>
>However, when the messagebox is called and closed, then oExcel is behind the VFP form? Is there an easy way to assure that Excel will be on top after the mesaagebox is closed?
>
>Thanks

oEx = CREATEOBJECT("Excel.application")
oEx.Visible=.t.
* click on VFP window
nHwnd = oEx.Hwnd
DECLARE INTEGER SetForegroundWindow IN user32 INTEGER hwnd
SetForegroundWindow(nHwnd)
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform