give focus to another window
Hi,
I am using vb.net.
When my app get focus, How can i know which window had focus before? When my app get focus, I must be able to refocus the previous window(suppose it is a text editor) and paste some text where the cursor is.
Somebody please let me know how and which api should i use
Re: give focus to another window
When your application gains or loses focus Windows sends the WM_ACTIVATEAPP message, the wParam will then contain the activation flag, TRUE if your application gains focus in which case lParam will contain the thread identifier of the thread that owns the window that is losing focus.
Re: give focus to another window
Can u explain with vb.net code?
Re: give focus to another window
No, cause I'm not using VB.Net. In classic VB you would subclass your form and check for the WM_ACTIVATEAPP message.
Re: give focus to another window
then please explain with classic vb code