Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to assure Excel on top
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00826248
Message ID:
00826535
Vues:
21
>>>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)
>
>VFP ON ERROR reports an unknown name (800200006) error on "nHwnd = oEx.Hwnd"

What version of Excel? Hwnd is on Excel2002. I don't have any other version of Excel installed that I can check.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform