Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bring Application to The Front of the Desktop?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01173376
Message ID:
01173452
Views:
8
>I have an application that I need to bring to the front of all other applications on the desktop. It is an alert form triggered with a timer. How can I make this happen.

Hi, Gene!

You can use WinAPI function SetForegroundWindow.
This function requires only one parameter - the handle of your application
window - hWnd
Declare it in the someplace within your application and call it when
You need (in the Taimer event) to bring your application window to front

Declare Integer SetForegroundWindow In user32 Integer hWFnd
...
...

= SetForegroundWindow(hWFnd)

(hWnd is a reserved VFP word so I use this name - hWFnd)

You can see an example at Anatoliy Mogylevets web-site www.news2news.com
Previous
Reply
Map
View

Click here to load this message in the networking platform