Article View: be.comp.programming
Article #5891VB6 - HELP!!!
From: Kelly Smith
Date: Mon, 24 Feb 2003 23:48
Date: Mon, 24 Feb 2003 23:48
30 lines
2957 bytes
2957 bytes
Hello VB-Experts, I am trying to write a On screen keyboard in Visual Basic 6. I am struggling with the following: I have a window representing a small keyboard, there is no physical keyboard attached to the system, the user clicks on the keyboard window, the keyboard window simulates the keyboard input by using "keybd_event()" (Win95 so no SendInput()). For "keybd_event()" to work correctly the focus should not change from the active application when the keyboard window is clicked. Problem: My application only receives notification messages after the original application already lost focus. This means that MA_NOACTIVATE, etc. will not work. The current solution does return focus to the correct window, but because the window momentarily lost focus the result is unacceptable. E.g. The IE URL edit window selects all the text when the focus is returned, and the resulting simulated key replaces all the text instead of appending to the current text. What I need: What I need is the behaviour as shown by the "on screen keyboard" available with Win2K (accessories, accessibility). I need to process mouse clicks in my keyboard window, but the application being virtually typed in must never loose focus. Can anyone (GURU) help me with this code please...? Kelly.
Technical Details
Message-ID:
<6by6a.4658$Dr1.1995290@amsnews03.chello.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor-online.net!newsfeed.freenet.de!amsnews01.chello.com!amsnews03.chello.com.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 104093,65b0e93699f841d,start X-Google-Attributes: gid104093,public X-Google-Thread: 102f44,65b0e93699f841d,start X-Google-Attributes: gid102f44,public X-Google-Thread: 10923d,65b0e93699f841d,start X-Google-Attributes: gid10923d,public X-Google-Thread: 107324,65b0e93699f841d,start X-Google-Attributes: gid107324,public X-Google-Thread: 10b423,65b0e93699f841d,start X-Google-Attributes: gid10b423,public X-Google-Thread: fcea4,65b0e93699f841d,start X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2003-02-24 15:48:30 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor-online.net!newsfeed.freenet.de!amsnews01.chello.com!amsnews03.chello.com.POSTED!not-for-mail From: "Kelly Smith" <power@cable.a2000.nl> Newsgroups: be.comp.programming,microsoft.public.inetsdk.programming.scripting.vbscript,microsoft.public.vb.winapi,microsoft.public.vb.winapi.graphics,microsoft.public.win32.programmer.tapi,nl.comp.programmeren Subject: VB6 - HELP!!! Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: <6by6a.4658$Dr1.1995290@amsnews03.chello.com> Date: Mon, 24 Feb 2003 23:48:18 GMT NNTP-Posting-Host: 62.108.15.164 X-Complaints-To: abuse@chello.nl X-Trace: amsnews03.chello.com 1046130498 62.108.15.164 (Mon, 24 Feb 2003 23:48:18 WET) NNTP-Posting-Date: Mon, 24 Feb 2003 23:48:18 WET Organization: chello broadband