|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Enter key vs Return keyIs there any way to distinguish the keypad Enter key from the standard
Return key? I think that this was asked some weeks ago (try to search Google) and I
think that not using .NET but maybe using the subclassing to trap the WM_KEYDOWN message and getting the info from the wparam or lparam. See: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputmessages/wm_keydown.asp -- Show quoteHide quoteBest regards, Carlos J. Quintero MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com <za***@construction-imaging.com> escribió en el mensaje news:1137425144.230393.108900@o13g2000cwo.googlegroups.com... > Is there any way to distinguish the keypad Enter key from the standard > Return key? > I may be wrong but doesn't the Keycode in the KeyDown or KeyUp events
differentiate beween these keys? -- Show quoteHide quoteDennis in Houston "Carlos J. Quintero [VB MVP]" wrote: > I think that this was asked some weeks ago (try to search Google) and I > think that not using .NET but maybe using the subclassing to trap the > WM_KEYDOWN message and getting the info from the wparam or lparam. See: > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputmessages/wm_keydown.asp > > -- > > Best regards, > > Carlos J. Quintero > > MZ-Tools: Productivity add-ins for Visual Studio > You can code, design and document much faster: > http://www.mztools.com > > > <za***@construction-imaging.com> escribió en el mensaje > news:1137425144.230393.108900@o13g2000cwo.googlegroups.com... > > Is there any way to distinguish the keypad Enter key from the standard > > Return key? > > > > > Hi Dennis,
The KeyCode is Return (13) in both cases, which makes sense, since your app normally is not interested in the physical key that was pressed. -- Show quoteHide quoteBest regards, Carlos J. Quintero MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com "Dennis" <Den***@discussions.microsoft.com> escribió en el mensaje news:34A6B933-298D-41FF-80D7-FE7EDFE2CA85@microsoft.com... >I may be wrong but doesn't the Keycode in the KeyDown or KeyUp events > differentiate beween these keys? > -- > Dennis in Houston > > <za***@construction-imaging.com> schrieb
> Is there any way to distinguish the keypad Enter key from the standard Private IsExtendedKey As Boolean> Return key? Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) Const WM_KEYDOWN As Integer = &H100 Const WM_KEYUP As Integer = &H101 If m.Msg = WM_KEYDOWN OrElse m.Msg = WM_KEYUP Then IsExtendedKey = (m.LParam.ToInt32 And &H1000000) <> 0 End If MyBase.WndProc(m) End Sub In KeyDown/KeyUp, you can check IsExtendedKey now. Armin
Display the contents of a folder in a listbox?
How do I extract a page from word and insert into a new word document using VB OFF TOPIC: Famous failed IT projects Webbrowser & XML Reading dll-Functions and execute them how to kill a thread Question on VB.Net security for the application to run on network drive Comm Ports Code for Convert RTF Text to HTML Is MDI supported by .Net? |
|||||||||||||||||||||||