|
-
Nov 22nd, 2005, 03:23 AM
#1
Thread Starter
Hyperactive Member
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
DOK OCK : "The power of .net in the palm of my hand, nothing will stand in my way. Nothing." 
-
Nov 22nd, 2005, 05:35 PM
#2
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.
-
Nov 23rd, 2005, 02:17 AM
#3
Thread Starter
Hyperactive Member
Re: give focus to another window
Can u explain with vb.net code?
DOK OCK : "The power of .net in the palm of my hand, nothing will stand in my way. Nothing." 
-
Nov 23rd, 2005, 07:53 AM
#4
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.
-
Nov 23rd, 2005, 10:32 AM
#5
Thread Starter
Hyperactive Member
Re: give focus to another window
then please explain with classic vb code
DOK OCK : "The power of .net in the palm of my hand, nothing will stand in my way. Nothing." 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|