PC Review


Reply
Thread Tools Rate Thread

Auslessen Enter-Key

 
 
Stefan
Guest
Posts: n/a
 
      4th Nov 2005
Hallo NG

Gibt es eine Möglichkeit die Beiden Entertasten programmatisch zu
unterscheiden?
Enter Tasten / Enter NumBlock

Vielen Dank für eure Hilfe
Stefan


 
Reply With Quote
 
 
 
 
Carlos J. Quintero [VB MVP]
Guest
Posts: n/a
 
      4th Nov 2005
Hi Stefan,

This is an English newsgroup. The German newsgoups contain ".de." in the
name.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Stefan" <(E-Mail Removed)> escribió en el mensaje
news:(E-Mail Removed)...
> Hallo NG
>
> Gibt es eine Möglichkeit die Beiden Entertasten programmatisch zu
> unterscheiden?
> Enter Tasten / Enter NumBlock
>
> Vielen Dank für eure Hilfe
> Stefan
>



 
Reply With Quote
 
Stefan
Guest
Posts: n/a
 
      4th Nov 2005
oh sorry!
ok, now my problem in english:
is there a way the difference both enter-keys in code? one on the num-pad
and the other.
if yes: is it possible to change one enter-event to an other value?

"Carlos J. Quintero [VB MVP]" <(E-Mail Removed)> schrieb im
Newsbeitrag news:(E-Mail Removed)...
> Hi Stefan,
>
> This is an English newsgroup. The German newsgoups contain ".de." in the
> name.
>
> --
>
> Best regards,
>
> Carlos J. Quintero
>
> MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
> You can code, design and document much faster.
> Free resources for add-in developers:
> http://www.mztools.com
>
> "Stefan" <(E-Mail Removed)> escribió en el mensaje
> news:(E-Mail Removed)...
>> Hallo NG
>>
>> Gibt es eine Möglichkeit die Beiden Entertasten programmatisch zu
>> unterscheiden?
>> Enter Tasten / Enter NumBlock
>>
>> Vielen Dank für eure Hilfe
>> Stefan
>>

>
>



 
Reply With Quote
 
Carlos J. Quintero [VB MVP]
Guest
Posts: n/a
 
      4th Nov 2005
I don´t think so using the KeyDown event (both are mapped to
KeyCode.Return), but it should be possible overriding ProcessKeyMessage in
the form, looking at some bits of the lparam (extended key flag or similar)
and calling to the base.ProcessKeyMessage:

WM_KEYDOWN Notification
http://msdn.microsoft.com/library/de...wm_keydown.asp

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Stefan" <(E-Mail Removed)> escribió en el mensaje
news:eVhv%(E-Mail Removed)...
> oh sorry!
> ok, now my problem in english:
> is there a way the difference both enter-keys in code? one on the num-pad
> and the other.
> if yes: is it possible to change one enter-event to an other value?
>


 
Reply With Quote
 
Rob Perkins
Guest
Posts: n/a
 
      4th Nov 2005
Stefan wrote:
> oh sorry!
> ok, now my problem in english:
> is there a way the difference both enter-keys in code? one on the num-pad
> and the other.
> if yes: is it possible to change one enter-event to an other value?


If what you want is to have both keys behave the same, it looks like the
Keys enumeration already does that for you; either button press will
return the value 13 (decimal); just override or attach a delegate to the
KeyDown event.

Carlos pointed out the ProcessKeyMessage method; override that and you
have access to the raw WM_KEYDOWN event data, where bit 24 shows if the
extended keys were touched: Message.LParam contains 0x11c0001 if it's
the keypad, and 0x1c0001 if it isn't.

The Forms.Message parameter is ByRef, you could probably change the
value of LParam there and just do a "Return MyBase.ProcessKeyMessage(m)"
to let the control do whatever it does after you've changed your data.

Macht mir nix aus wenn Du Deutsch hier reden willst. Es gibt doch ein
wenig hier, die Dich verstehen koennen, auch wenn wir keine Umlauttasten
auf der Tastatur besitzen. :-)

Rob, who had to look up the gender article for "Tastatur" and still
isn't sure he got it right...
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to select cells in column enter data then press enter NP Microsoft Excel New Users 1 20th Feb 2008 04:21 PM
hitting enter or shift+enter in asp.net designer messes up html code? Sunfire Microsoft ASP .NET 2 6th Nov 2007 02:44 PM
Enter multiple numbers in a cell so total shows when enter keypres =?Utf-8?B?bmV3Ymll?= Microsoft Excel Worksheet Functions 2 19th Aug 2007 12:23 PM
Enter data in table - ability to enter multiple fields =?Utf-8?B?SmFja2llUg==?= Microsoft Access Getting Started 4 7th Oct 2005 06:53 AM
Enter user name, enter password, then press enter... =?Utf-8?B?UGF1bCAoRVNJKQ==?= Microsoft Access Forms 6 11th Jul 2005 05:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:39 PM.