Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Office Automation with Windows 7
Message
 
À
03/04/2014 09:47:31
Kevin Hickman
The Cadle Company
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01597899
Message ID:
01597992
Vues:
82
>Allow me to further clarify. I have tried both the miaximize and visible codes before. What it does is the application excel is pulled up visible and maximized as a window but gets pushed to the background now and my VFP program has focus over top of it while the excel iconc appears at the bottom on the win 7 taskbar with the background of the icon colid in color. How do I get it to switch focus to the excel app as it did normally when I ran it in XP?

Try this:
DECLARE INTEGER FindWindow        IN WIN32API STRING @lpClassName, STRING @lpWindowName
DECLARE INTEGER BringWindowToTop  IN WIN32API INTEGER
DECLARE INTEGER ShowWindow        IN WIN32API INTEGER lnHwnd, integer nCmdShow
DECLARE INTEGER IsIconic          IN WIN32API INTEGER lnHwnd

lnHWnd = FindWindow(0, "Caption of the WORD window here")
BringWindowToTop(lnHwnd)
ShowWindow(lnHwnd, 3)
IF IsIconic(lnHWnd) <> 0
   ShowWindow(lnHWnd,9)
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform