🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.programming
Article #18

Re: KELLY (me) NEEDS help with a VB6 CODE!!!! Please help me out!

#18
From: Francois
Date: Fri, 03 Jan 2003 18:42
54 lines
3954 bytes
have U tried SendMessage api?


"Kelly Smith" <power@cable.a2000.nl> wrote in message news:<YyqH9.19224$vj1.4592999@amsnews02.chello.com>...
> Hello,
> 
> Desperately need help programming a Visual Keyboard. I am a newbie VB-6
> programmer. I am struggeling with something. Unfortunately I didn't find any
> code for what I want, my Virtual Keyboard to do.
> 
> I made a lovely interface. Keyboard exists with command buttons. Allmost the
> same as Microsoft Visual Keyboard, but mine isn't working :-).
> I cannot call ALT, SHIFT, ESC, MENU, TAB, BACKSPACE, F1, F2... buttons and
> also have problems finding code for sending Keys to previous window (or the
> box where I click with the mouse, into a place where I want to write with my
> VKeyboard). I use OnTopMost for my Form (Keyboard).
> I found something that first opens a notepad and than sends the key. It has
> to send keys to any application that uses texboxes, like I-explorer,
> notepad, E-mail, etc...
> 
> Example:
> 
>     Private Declare Function OemKeyScan Lib "user32" (ByVal wOemChar As
> Integer) As Long
>     Private Declare Function CharToOem Lib "user32" Alias "CharToOemA"
> (ByVal lpszSrc As String, ByVal lpszDst As String) As Long
>     Private Declare Function MapVirtualKey Lib "user32" Alias
> "MapVirtualKeyA" (ByVal wCode As Long, ByVal wMapType As Long) As Long
>     Private Declare Function SetKeyboardState Lib "user32" (lppbKeyState As
> Byte) As Long
>     Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As
> Long) As Integer
>     Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal
> bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
> 
>     Private Const KEYEVENTF_EXTENDEDKEY = &H1
>     Private Const KEYEVENTF_KEYUP = &H2
> ...
> ...
> Const VK_Q = 81
> ...
> ...
> Private Sub Command29_Click(Index As Integer)
>     Shell "C:\WINNT\Notepad.exe", vbNormalFocus
>     keybd_event VK_Q, 0, 0, 0   'Q Key
>     keybd_event VK_Q, 0, KEYEVENTF_KEYUP, 0
> End Sub
> 
> Please can someone help me, or guide me on this? I am trying programming it
> for months now (I am a beginner)! Please send me an e-mail, because I could
> mis your msg (my e-mail is power@cable.a2000.nl)
> 
> 
> Thanks A LOT! xxx
Technical Details
Message-ID: <9b7e1cf2.0301031042.1c4a7dee@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
References: <YyqH9.19224$vj1.4592999@amsnews02.chello.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 110e3b,f31cea096f84f60d
X-Google-Attributes: gid110e3b,public
X-Google-Thread: 10dce5,f31cea096f84f60d
X-Google-Attributes: gid10dce5,public
X-Google-Thread: f51ba,f31cea096f84f60d
X-Google-Attributes: gidf51ba,public
X-Google-Thread: f5f6f,f31cea096f84f60d
X-Google-Attributes: gidf5f6f,public
X-Google-Thread: 1143a7,f31cea096f84f60d
X-Google-Attributes: gid1143a7,public
X-Google-Thread: 10b997,f31cea096f84f60d
X-Google-Attributes: gid10b997,public
X-Google-Thread: fcea4,f31cea096f84f60d
X-Google-Attributes: gidfcea4,public
X-Google-Thread: ffc1e,f31cea096f84f60d
X-Google-Attributes: gidffc1e,public
X-Google-ArrivalTime: 2003-01-03 10:42:01 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: berfr@hotmail.com (Francois)
Newsgroups: alt.comp.programming,be.comp.programming,comp.lang.basic.visual.3rdparty,comp.lang.basic.visual.database,comp.lang.basic.visual.misc,comp.programming.threads,dk.edb.programmering.basic.visual-basic,it.comp.lang.visual-basic,microsoft.public.ru.rus
Subject: Re: KELLY (me) NEEDS help with a VB6 CODE!!!! Please help me out!
Date: 3 Jan 2003 10:42:00 -0800
Organization: http://groups.google.com/
Lines: 54
Message-ID: <9b7e1cf2.0301031042.1c4a7dee@posting.google.com>
References: <YyqH9.19224$vj1.4592999@amsnews02.chello.com>
NNTP-Posting-Host: 216.209.245.47
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1041619321 29309 127.0.0.1 (3 Jan 2003 18:42:01 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 3 Jan 2003 18:42:01 GMT