From: Karl E. Peterson on
It happens that Steve formulated :
> On Jun 15, 4:16�pm, Karl E. Peterson <k...(a)exmvps.org> wrote:
>> Steve was thinking very hard :
>>
>>
>>
>>
>>
>>> On Jun 15, 3:34 pm, Karl E. Peterson <k...(a)exmvps.org> wrote:
>>>> Steve wrote:
>>>>>>> Can someone tell me what I am doing wrong.
>>>>>> Well, not precisely, because I really haven't done this much. But
>>>>>> there's a precise order you need to send the keystrokes in. I think
>>>>>> you'll want to first send the Control down, then the A down, then the A
>>>>>> up, then the Control up. Not sure what you're trying to do with
>>>>>> SetKeyboardState?
>>
>>>>> As I understand it the Control keys are managed via keyboard state and
>>>>> can not simply be sent via the send/postmessage functions. However
>>>>> this could be wrong as I have no personal experience with it. I think
>>>>> I already tried simply sending the control key with a send message but
>>>>> I will try again and let you know how it works.
>>>> Hmmm, well, that's possible. It's not how I do with SendInput, which I
>>>> may be confusing here with SendMessage methods.
>>> Well simply send the control key (via sendmessage or postmessage) did
>>> not work.
>>
>> Hmmmm, I think you'll need to attach to the other thread's input queue,
>> maybe? �Something like this...
>>
>> http://www.codeguru.com/forum/archive/index.php/t-49901.html
>>
>> There's also the WM_CHAR message that might be worth a shot?
>>
>> --
>> .NET: It's About Trust! �http://vfred.mvps.org
>> Customer Hatred Knows No Bounds at MSFT
>> ClassicVB Users Regroup! comp.lang.basic.visual.misc
>> Free usenet access athttp://www.eternal-september.org- Hide quoted text -
>>
>> - Show quoted text -
>
> Yeah I found that thread myself. Unfortunately, I do not do C,
> between that and what I assume are embedded html codes, I can't make
> heads or tails out of what the posters are saying.

Basically, each thread has an input queue. I think they're saying that
in order to affect the keyboard state of another thread, you have to
attach to that other thread's input queue. I used that method in my
http://vb.mvps.org/samples/ForceFore sample many years ago, if you'd
like to see a VB implementation.

--
..NET: It's About Trust! http://vfred.mvps.org
Customer Hatred Knows No Bounds at MSFT
ClassicVB Users Regroup! comp.lang.basic.visual.misc
Free usenet access at http://www.eternal-september.org