Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reopen application when minimized
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01116657
Message ID:
01232742
Views:
18
>You need to check if the application is already running before
>launching it again, one easy way to do it; but not the best; is to check
>for the window title of you application with this code:
>
>LOCAL lnWindowHandle
>
>DECLARE INTEGER FindWindow IN WIN32API INTEGER,STRING
>DECLARE INTEGER BringWindowToTop IN WIN32API INTEGER
>
>lnWindowHandle = FindWindow(0,lcMyWindowTitle)
>
>IF lnWwindowHandle > 0 && App is runing bring it forward
> =BringWindowToTop(lnWindowHandle)
>ENDIF
>
>HTH
>

This doesn't seem to work with Excel, which was started by automation. I was using SetForegroundWindow and tried this one - with no avail.

UPDATE. But adding ShowWindow with normal right after seems to help.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform