Rich,
You can use the WinAPI to activate your VFP window. Use Foxtools to get the handle of your VFP window and use SetForegroundWindow to activate it.
declare integer SetForegroundWindow in win32api integer
set library to foxtools.fll additive
lnwind = MainHWnd()
SetForegroundWindow(lnwind)
HTH.
>Hello,
>
>It all start with tring to find a way to create GLOBAL hot keys. Global being that even if the application is minimized and another app has focus the hot keys would work. I could not find anyway to do that in VFP, so I came with this idea.
>
>The "small box" is a Desktop form the is always on top with tiltle bar off. The main idea was you sweep your mouse over the "box" a data form is started (DO FORM) in the mouseover event, then press the hot key combo and it would perform some database functions. When the "box" has focus all works as I expected, however if some other application has focus and I swipe my mouse over the box the data form pops open but the hot keys do not work. I figured this out to be because the window although it pops up does get focus, therefore the hot keys do not function. If you click on the now open form the form gets focus and the hot keys work.
>
>I have tried setfocus to a field on the form, activate, show(), mouse click, read events, and countless other,even disable and enabling the form. I have run out of ideas.
>
>Any help yo could give would be great.
>
>Rich Imbruglio
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao