|
-
May 1st, 2001, 03:16 AM
#10
Frenzied Member
What works in NT4 (I haven't tested it on other platforms) is to subclass your application's main form and whenever you recieve a WM_ACTIVATEAPP message (&H1C) then return false if wParam is false.
The parameters for this message are:
wParam - TRUE if the application recieving the message is the one being activated
lParam- The ThreadId of whatever application is being activated.
That said, would it not be an idea to substitute the SendMessage API function and send WM_CHAR (&H102) messages to the target window? This will be unaffected by the user monkeying around with the focus.
The parameters for this message are:
wParam- Virtual key number (e.g. vbKeyA)
lParamBits (0-15) Repetitions
Bits (16-23) - Scan Code
Bit (24) - 1 if its an extended key
Bit (29) - 1 if alt was down
Bit (30) - 1 if this is an autorepeat key
Bit (31) - 1 if key up, 0 if key down
HTH,
Duncan
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
|