
28-Jul-2006, 08:09 AM
|  | Guest | | | | | | | | | | Re: How do I detect a Ctrl-E keystroke? use the Form's KeyDown Event (set KeyPreview to Yes) - or - the Control's
KeyDown Event
HTH
Pieter
"Nathan" wrote in message Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10079
news:E45E768D-712C-4DF7-BC4D-819B40B34491@microsoft.com...
>I understand detecting the "E" part of this, but how do I capture a
>Cntrl-E?
> I want to be able to type data in a field, but have a window pop up on
> when
> Cntrl-E is pressed. The help file said to use acCtrlMask, but that seems
> to
> give the same value regardless of whether it is down or not. I'm Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10079
> confused.
>
> Thanks,
>
> Nathan | 
28-Jul-2006, 08:09 AM
|  | Guest | | | | | | | | | | Re: How do I detect a Ctrl-E keystroke? That part I understand, but how do I determine that the control key is down
too? The user could press E during normal operation within this field and I
only want the dialog triggered on Ctrl-E.
Thanks
Nathan
"Pieter Wijnen" wrote:
> use the Form's KeyDown Event (set KeyPreview to Yes) - or - the Control's Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10079
> KeyDown Event
>
> HTH
>
> Pieter
>
> "Nathan" wrote in message Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10079
> news:E45E768D-712C-4DF7-BC4D-819B40B34491@microsoft.com...
> >I understand detecting the "E" part of this, but how do I capture a
> >Cntrl-E?
> > I want to be able to type data in a field, but have a window pop up on
> > when
> > Cntrl-E is pressed. The help file said to use acCtrlMask, but that seems
> > to
> > give the same value regardless of whether it is down or not. I'm
> > confused.
> >
> > Thanks,
> >
> > Nathan
>
>
> | 
28-Jul-2006, 08:09 AM
|  | Guest | | | | | | | | | | Re: How do I detect a Ctrl-E keystroke? there's an unique integer value associated with the key-combo (keycode ,
shift)
69, 0 (normal e)
69,2 (ctrl+e)
hth
Pieter
code sample
Private Sub Text0_KeyDown(KeyCode As Integer, Shift As Integer)
Debug.Print KeyCode, Shift Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10079
End Sub
"Nathan" wrote in message
news:EE78963E-2B55-4526-9522-1CC1061F164B@microsoft.com...
> That part I understand, but how do I determine that the control key is
> down
> too? The user could press E during normal operation within this field and
> I
> only want the dialog triggered on Ctrl-E.
>
> Thanks
>
> Nathan
>
> "Pieter Wijnen" wrote:
>
>> use the Form's KeyDown Event (set KeyPreview to Yes) - or - the Control's
>> KeyDown Event
>>
>> HTH
>>
>> Pieter
>>
>> "Nathan" wrote in message
>> news:E45E768D-712C-4DF7-BC4D-819B40B34491@microsoft.com...
>> >I understand detecting the "E" part of this, but how do I capture a
>> >Cntrl-E?
>> > I want to be able to type data in a field, but have a window pop up on Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10079
>> > when
>> > Cntrl-E is pressed. The help file said to use acCtrlMask, but that
>> > seems
>> > to
>> > give the same value regardless of whether it is down or not. I'm
>> > confused.
>> >
>> > Thanks,
>> >
>> > Nathan
>>
>>
>> | 
28-Jul-2006, 08:10 AM
|  | Guest | | | | | | | | | | Re: How do I detect a Ctrl-E keystroke?
"Nathan" дÈëÓʼþ
news:EE78963E-2B55-4526-9522-1CC1061F164B@microsoft.com...
> That part I understand, but how do I determine that the control key is
down
> too? The user could press E during normal operation within this field and
I
> only want the dialog triggered on Ctrl-IF.
>
> Thanks
>
> Nathan
>
> "Pieter Wijnen" wrote:
>
> > use the Form's KeyDown Event (set KeyPreview to Yes) - or - the Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10079 Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10079
Control's
> > KeyDown Event
> >
> > HTH
> >
> > Pieter
> >
> > "Nathan" wrote in message
> > news:E45E768D-712C-4DF7-BC4D-819B40B34491@microsoft.com...
> > >I understand detecting the "E" part of this, but how do I capture a
> > >Cntrl-E?
> > > I want to be able to type data in a field, but have a window pop up on
> > > when
> > > Cntrl-E is pressed. The help file said to use acCtrlMask, but that
seems
> > > to
> > > give the same value regardless of whether it is down or not. I'm
> > > confused.
> > >
> > > Thanks,
> > >
> > > Nathan
> >
> >
> > | 
28-Jul-2006, 08:10 AM
|  | Guest | | | | | | | | | | Re: How do I detect a Ctrl-E keystroke? Make a form with two text boxes on it to run this code: Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10079
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Me.Text0 = KeyCode
Me.Text2 = Shift
End Sub
Set KeyPreview to yes on the form. using KeyDown or KeyUp you can test
KeyCode (in the event signature) to see the value of Shift. Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10079
1=shift key
2=control key
4=alt key
You can get combinations, for example 3 = control+shift.
HTH | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Gurbani Jukebox | Listen to Gurbani while surfing SPN! | » Recent Discussions | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |