List Info

Thread: Re: form key handling




Re: form key handling
user name
2008-07-03 13:29:53
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 <Peterproteindiscovery.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 DevelopMentor(R)  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


Re: form key handling
country flaguser name
United States
2008-07-03 14:06:18
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=c
ombobox+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-DOTNETDISCUSS.DEVELOP.COM] On Behalf Of Adam
Tuliper
Sent: Thursday, July 03, 2008 2:30 PM
To: ADVANCED-DOTNETDISCUSS.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
<Peterproteindiscovery.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 DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )