🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.programming
Article #19

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

#19
From: Kelly Smith
Date: Wed, 04 Dec 2002 17:02
50 lines
3941 bytes
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: <YyqH9.19224$vj1.4592999@amsnews02.chello.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!amsnews01.chello.com!amsnews02.chello.com.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ffc1e,f31cea096f84f60d,start
X-Google-Attributes: gidffc1e,public
X-Google-Thread: 110e3b,f31cea096f84f60d,start
X-Google-Attributes: gid110e3b,public
X-Google-Thread: f5f6f,f31cea096f84f60d,start
X-Google-Attributes: gidf5f6f,public
X-Google-Thread: f51ba,f31cea096f84f60d,start
X-Google-Attributes: gidf51ba,public
X-Google-Thread: 10dce5,f31cea096f84f60d,start
X-Google-Attributes: gid10dce5,public
X-Google-Thread: fcea4,f31cea096f84f60d,start
X-Google-Attributes: gidfcea4,public
X-Google-Thread: 1143a7,f31cea096f84f60d,start
X-Google-Attributes: gid1143a7,public
X-Google-Thread: 10b997,f31cea096f84f60d,start
X-Google-Attributes: gid10b997,public
X-Google-ArrivalTime: 2002-12-04 09:04:03 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!amsnews01.chello.com!amsnews02.chello.com.POSTED!not-for-mail
From: "Kelly Smith" <power@cable.a2000.nl>
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: KELLY (me) NEEDS help with a VB6 CODE!!!! Please help me out!
Lines: 52
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <YyqH9.19224$vj1.4592999@amsnews02.chello.com>
Date: Wed, 04 Dec 2002 17:02:48 GMT
NNTP-Posting-Host: 62.108.15.164
X-Complaints-To: abuse@chello.com
X-Trace: amsnews02.chello.com 1039021368 62.108.15.164 (Wed, 04 Dec 2002 18:02:48 MET)
NNTP-Posting-Date: Wed, 04 Dec 2002 18:02:48 MET
Organization: chello broadband