Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP staying on top
Message
 
 
To
03/02/2003 13:50:51
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00748509
Message ID:
00749062
Views:
19
Karen,
If you can get the hWnd of the desired window you can use the Win32 API function SetForegroundWindow(Hwnd).

I use this function from a FLL that contains a variety of functions the code I use looks like this:

void FAR Activate_Window(ParamBlk FAR *parm)
{
HWND dwnd;
//DWORD thrid, tmpid;


dwnd = (HWND)parm->p[0].val.ev_long;

if (dwnd)
{
if(SetForegroundWindow(dwnd))
_RetInt(1,10);
else
_RetInt(-1,10);
}
else
_RetInt(0,10);

}

Hope This Helps,
ED

PS. If you need to find the hWnd try the Win32 API function FindWindowEx
Ed Aguinaga
ARIS, Inc
ed@arismls.com
Previous
Reply
Map
View

Click here to load this message in the networking platform