Re: SendKeys under Windows Vista with VB3
- From: "Mike Williams" <mike@xxxxxxxxxxxxxxxxx>
- Date: Sat, 20 Oct 2007 19:51:57 +0100
"Randy Birch" <rgb_removethis@xxxxxxxx> wrote in message news:eIfKkT0EIHA.4748@xxxxxxxxxxxxxxxxxxxxxxx
hmm ... vb3 was a 16-bit OS; AFAIK it can't call the
32-bit apis. The 16-bit lib for user32 was just user; I
suspect this is no longer provided on Vista
Thanks Rick. Of course you're right (do you ever get bored with that? <g>). I've never used VB3 myself and I never considered that possibility. The old 16 bit User library is definitely no longer provided in Vista, and if VB3 cannot use the 32 bit library then the OP cannot of course use the KeyBd event or indeed any other API funcion, which also rules out subclassing the keyboard, which is the other method I might have suggested. Looking at the OP's most recent post the only job he wants to do is send the Tab key when the user presses Enter, in which case he is probably allowing the user to navigate between TextBoxes using Enter, which is what I often do myself by the way. If that is the case then he'll have to simply trap the Enter key in the Text Boxes and set focus to the next desired text box, something like:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
Text2.SetFocus
End If
End Sub
And if he wants to also allow the equivalent of Shift Tab (backwards navigation) then he can test for the Shift key in the Keyown event. All this will of course be much eaiser if his textBoxes are in an aray (did VB3 have Control arrays?).
Mike
.
- References:
- Re: SendKeys under Windows Vista with VB3
- From: Mike Williams
- Re: SendKeys under Windows Vista with VB3
- From: jvsp
- Re: SendKeys under Windows Vista with VB3
- From: Mike Williams
- Re: SendKeys under Windows Vista with VB3
- From: Randy Birch
- Re: SendKeys under Windows Vista with VB3
- Prev by Date: Re: VB6 LISTBOX problem
- Next by Date: Re: SendKeys under Windows Vista with VB3
- Previous by thread: Re: SendKeys under Windows Vista with VB3
- Next by thread: Re: SendKeys under Windows Vista with VB3
- Index(es):
Relevant Pages
|