🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #22205

Re: Jak dodać zdarzenie KeyDown do Panel

#22205
From: Maciej Rychter
Date: Mon, 06 Jun 2011 14:24
35 lines
2467 bytes
On 6 Cze, 14:18, akowal <akrunne...@gmail.com> wrote:
> Witam
>
> zrobiłem coś takiego:
>
> public partial class Form1 : Form
> {
>         public Form1()
>         {
>                 InitializeComponent();
>         }
>
>         private void Form1_Load(object sender, EventArgs e)
>         {
>                 this.ActiveControl = this.panel1;
>                 this.panel1.KeyDown += new KeyEventHandler(panel1_KeyDown);
>         }
>
>         void panel1_KeyDown(object sender, KeyEventArgs e)
>         {
>                 String s = e.KeyCode.ToString();
>                 MessageBox.Show(s);
>         }
>
> }
>
> ale jak np. wciśne klawisz "Delete", to kumunikat pojawia mi sie dwa
> razy,
> o co może chodzić?
>
> Pozdrawiam

Wrzuć gdzieś przykładowy projekt. Nie wiem jakie inne kontrolki na tej
formie są i zdarzenia.
a jak ustawisz e.handled = true? To nie pomaga?
Technical Details
Message-ID: <09ccfcea-a2b4-4a49-b874-fcfb9f53a424@m4g2000yqk.googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!plix.pl!newsfeed1.plix.pl!goblin1!goblin.stu.neva.ru!postnews.google.com!m4g2000yqk.googlegroups.com!not-for-mail
References: <01ebc3ac-0c03-4fab-b148-767902beaa84@j31g2000yqe.googlegroups.com> <28523cf1-ce13-4f33-a533-388e545ca2b3@d1g2000yqe.googlegroups.com> <a85d1a36-1708-4835-a39e-6f0f5aab3c37@z13g2000yqg.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!plix.pl!newsfeed1.plix.pl!goblin1!goblin.stu.neva.ru!postnews.google.com!m4g2000yqk.googlegroups.com!not-for-mail
From: Maciej Rychter <rychter.maciej@gmail.com>
Newsgroups: alt.pl.comp.lang.csharp
Subject: Re: Jak dodać zdarzenie KeyDown do Panel
Date: Mon, 6 Jun 2011 07:24:43 -0700 (PDT)
Organization: http://groups.google.com
Lines: 37
Message-ID: <09ccfcea-a2b4-4a49-b874-fcfb9f53a424@m4g2000yqk.googlegroups.com>
References: <01ebc3ac-0c03-4fab-b148-767902beaa84@j31g2000yqe.googlegroups.com> <28523cf1-ce13-4f33-a533-388e545ca2b3@d1g2000yqe.googlegroups.com> <a85d1a36-1708-4835-a39e-6f0f5aab3c37@z13g2000yqg.googlegroups.com>
NNTP-Posting-Host: 80.94.182.138
Mime-Version: 1.0
X-Trace: posting.google.com 1307370283 6452 127.0.0.1 (6 Jun 2011 14:24:43 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 6 Jun 2011 14:24:43 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: m4g2000yqk.googlegroups.com; posting-host=80.94.182.138; posting-account=0LtQXAoAAABsec8yh6dn4H8zU73p878u
User-Agent: G2/1.0
X-HTTP-Via: 1.1 webwasher (Webwasher 6.8.7.9979)
X-Google-Web-Client: true
X-Google-Header-Order: ASELNKCHRUV
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.71 Safari/534.24,gzip(gfe)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit