You may have noticed that when you try and bring your application's window to the front using API calls (SetForeGroundWindow and BringWindowToTop) that it just blinks down in the taskbar. This applies to Windows 2000 and later Microsoft OS's (see MS Documentation below). Well, if you would rather have your applicaiton's window truly come to the front (and I'm sure you do) then here's a VFP workaround using API calls.
MS Documentation for SetForegroundWindow reads as follows: "Windows NT 5.0 and later: An application cannot force a window to the foreground while the user is working with another window. Instead, SetForegroundWindow will activate the window (see SetActiveWindow) and call the FlashWindowEx function to notify the user."
...and it appears that the same is true for BringWindowToTop.
The only way Windows 2000 and Windows XP let you bring your application's window up to the front is if the thread it is running on is the thread of the foreground window at the time. So, you have to attach the thread of your application to the thread of the foreground window and then bring your application's window to the front. After that you need to detach your thread (this all only happens if the user has another application's window as the foreground active window). It looks like a lot, but really we are just tricking Windows into thinking that our application window is part of the foreground application so that it will let us bring our window up to the front rather than having it just blink in the taskbar. The key to this whole thing is the AttachThreadInput API calls.
DECLARE Long FindWindow In Win32API String, String