What about trapping the key_whatever event at the form level
and then
determine the control that caused it, would this work?
John Warner
> -----Original Message-----
> From: Discussion of advanced .NET topics.
> [mailto:ADVANCED-DOTNET DISCUSS.DEVELOP.COM] On
Behalf Of Peter Osucha
> Sent: Thursday, July 03, 2008 3:06 PM
> To: ADVANCED-DOTNET DISCUSS.DEVELOP.COM
> Subject: Re: [ADVANCED-DOTNET] form key handling
>
>
> That doesn't exactly work as desired, Adam. Here are a
> collection of links discussing this - I haven't yet
looked at
> one that help me out.
>
> The behavior I'm looking for is similar to when you
press
> [ENTER] in one of the Outlook drop down boxes on the
main
> Outlook form.
>
> http://www.google.com/search?q=combobox+enter+
key+c%23&ie=utf-
8&oe=utf-8
&aq=t&rls=org.mozilla:en-US:official&client=fire
fox-a
Peter
-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:ADVANCED-DOTNET DISCUSS.DEVELOP.COM] On Behalf Of Adam
Tuliper
Sent: Thursday, July 03, 2008 2:30 PM
To: ADVANCED-DOTNET DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] form key handling
just something like this would work.....no?
private void comboBox1_KeyPress(object sender,
KeyPressEventArgs
e)
{
MessageBox.Show(
((short)System.Windows.Forms.Keys.Enter ==
(short)e.KeyChar).ToString());
}
On Thu, Jul 3, 2008 at 10:38 AM, Peter Osucha <Peter proteindiscovery.com>
wrote:
> Does anyone have a good link that shows how to handle
an [ENTER] key
> press when a user types in a combobox? I've looked at
several
examples
> that I googled and can't seem to make much sense out of
them.
>
> Sincerely,
> Peter
===================================
This list is hosted by DevelopMentorR http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|