Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Office Automation with Windows 7
Message
 
To
03/04/2014 09:47:31
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01597899
Message ID:
01597992
Views:
81
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform