what can i use to always give my application focus over other applications? i plan to use a timer too.
Printable View
what can i use to always give my application focus over other applications? i plan to use a timer too.
Are you talking about always having your program the top most window? If so, thats pretty easy to do. If this is what you want, let me know. I have some code that will do that.
i want it to always have focus so when i type, textbox gets the keystrokes.
Are you trying to make a keylogger? Search the forums if so, there are a lot of threads on it.
thanks for always answering filburt. i am not making a keylogger. i made a screen saver and placed in the start up directory but sometimes, my screensaver doesn't get focus so i can't type my password into the text box.
For it to ALWAYS have focus, put AppActivate Me.Caption in the Form_LostFocus event.Quote:
Originally posted by Hawk
i want it to always have focus so when i type, textbox gets the keystrokes.
way to go. that work but i placed in a timer. lost_focus did not work as well.
But otherwise everything's cool?
yes everything is cool, thanks filburt.
:cool:
just want to share this with you Filburt. using appactivate works but when my form does not have a caption, there is a problem. i found this which works really well cuz it uses the form's handle.
Private Declare Function SetForegroundWindow Lib "user32.dll" (ByVal hwnd As Long) As Long
:cool: again. :)