By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,724 Members | 859 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,724 IT Pros & Developers. It's quick & easy.

UserControl Key events don't fire?

P: n/a
I can't get any of the Key events to fire in my UserControl.
The control only contains a few labels.

This is really annoying..

Anyone know whats going on?

Thanks,

Schneider
Nov 20 '05 #1
Share this Question
Share on Google+
16 Replies


P: n/a
Is ths form's KeyPreview property set to true?
"schneider" <00**@0000.SPAM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I can't get any of the Key events to fire in my UserControl.
The control only contains a few labels.

This is really annoying..

Anyone know whats going on?

Thanks,

Schneider

Nov 20 '05 #2

P: n/a
You are posting in every group you come across!!! You should only post once
and give it some time. Others may benefit from your ONE post when the answer
is centrally located, furthermore, 10 other people won't waste time trying
to answer a post that has already been answered by someone else. Please post
ONCE and wait for your answer.

"Jared" <VB***********@email.com> wrote in message
news:10*************@corp.supernews.com...
Is ths form's KeyPreview property set to true?
"schneider" <00**@0000.SPAM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I can't get any of the Key events to fire in my UserControl.
The control only contains a few labels.

This is really annoying..

Anyone know whats going on?

Thanks,

Schneider


Nov 20 '05 #3

P: n/a
Yes,
Tried both T/F.

Schneider
"Jared" <VB***********@email.com> wrote in message
news:10*************@corp.supernews.com...
Is ths form's KeyPreview property set to true?
"schneider" <00**@0000.SPAM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I can't get any of the Key events to fire in my UserControl.
The control only contains a few labels.

This is really annoying..

Anyone know whats going on?

Thanks,

Schneider


Nov 20 '05 #4

P: n/a
I posted to This thread, and Vb.Controls, you get different types of users,
and there is no specific control_Author for winforms like there is for ASP.

Schneider

"Jared" <VB***********@email.com> wrote in message
news:10*************@corp.supernews.com...
Is ths form's KeyPreview property set to true?
"schneider" <00**@0000.SPAM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I can't get any of the Key events to fire in my UserControl.
The control only contains a few labels.

This is really annoying..

Anyone know whats going on?

Thanks,

Schneider


Nov 20 '05 #5

P: n/a
do you have events inside your control? do they raise another event to your
app? are they supposed to be handled inside your control? What are you
trying to accomplish? you should give more details, mabye some code.

"schneider" <00**@0000.SPAM> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Yes,
Tried both T/F.

Schneider
"Jared" <VB***********@email.com> wrote in message
news:10*************@corp.supernews.com...
Is ths form's KeyPreview property set to true?
"schneider" <00**@0000.SPAM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> I can't get any of the Key events to fire in my UserControl.
> The control only contains a few labels.
>
> This is really annoying..
>
> Anyone know whats going on?
>
> Thanks,
>
> Schneider
>
>



Nov 20 '05 #6

P: n/a
I understand, but a lot of the users do read more than a single group. I
just get "urked" when I take the time to try and answer a question that has
been spammed to every newsgroup. It's late for me, I get cranky. Sorry.

"schneider" <00**@0000.SPAM> wrote in message
news:uQ**************@TK2MSFTNGP12.phx.gbl...
I posted to This thread, and Vb.Controls, you get different types of users,
and there is no specific control_Author for winforms like there is for
ASP.

Schneider

"Jared" <VB***********@email.com> wrote in message
news:10*************@corp.supernews.com...
Is ths form's KeyPreview property set to true?
"schneider" <00**@0000.SPAM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> I can't get any of the Key events to fire in my UserControl.
> The control only contains a few labels.
>
> This is really annoying..
>
> Anyone know whats going on?
>
> Thanks,
>
> Schneider
>
>



Nov 20 '05 #7

P: n/a
I want to capture control keys, like Control,Alt & Cursors directions from
my user control code. The events do not get raised inside to control code.
They have the handlers for Mybase.Handles.* set, and I have event methods
for KeyDown, KeyUp, KeyPress and none of them fire.

I have also set the ControlStyles to Selectable...

Schneider.
"Jared" <VB***********@email.com> wrote in message
news:10*************@corp.supernews.com...
do you have events inside your control? do they raise another event to your app? are they supposed to be handled inside your control? What are you
trying to accomplish? you should give more details, mabye some code.

"schneider" <00**@0000.SPAM> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Yes,
Tried both T/F.

Schneider
"Jared" <VB***********@email.com> wrote in message
news:10*************@corp.supernews.com...
Is ths form's KeyPreview property set to true?
"schneider" <00**@0000.SPAM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> I can't get any of the Key events to fire in my UserControl.
> The control only contains a few labels.
>
> This is really annoying..
>
> Anyone know whats going on?
>
> Thanks,
>
> Schneider
>
>



Nov 20 '05 #8

P: n/a
Yes, I agree, and Try my best to refrain. But some of these groups are not
specific enough, sometime you get better results from another group, even
several days later.

Schneider

"Jared" <VB***********@email.com> wrote in message
news:10*************@corp.supernews.com...
I understand, but a lot of the users do read more than a single group. I
just get "urked" when I take the time to try and answer a question that has been spammed to every newsgroup. It's late for me, I get cranky. Sorry.

"schneider" <00**@0000.SPAM> wrote in message
news:uQ**************@TK2MSFTNGP12.phx.gbl...
I posted to This thread, and Vb.Controls, you get different types of users, and there is no specific control_Author for winforms like there is for
ASP.

Schneider

"Jared" <VB***********@email.com> wrote in message
news:10*************@corp.supernews.com...
Is ths form's KeyPreview property set to true?
"schneider" <00**@0000.SPAM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> I can't get any of the Key events to fire in my UserControl.
> The control only contains a few labels.
>
> This is really annoying..
>
> Anyone know whats going on?
>
> Thanks,
>
> Schneider
>
>



Nov 20 '05 #9

P: n/a
I don't know the answer why, but it seem as though the form doesn't process
these keys. If you add a text box control and monitor the key press
Keys.Left, Keys.Right, Keys.Up and Keys.Down are processed. I don't know
why! You could create a system wide hotkey for those keys and process them
in your own code. I am curious to read the answer.
"schneider" <00**@0000.SPAM> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I want to capture control keys, like Control,Alt & Cursors directions from
my user control code. The events do not get raised inside to control code.
They have the handlers for Mybase.Handles.* set, and I have event methods
for KeyDown, KeyUp, KeyPress and none of them fire.

I have also set the ControlStyles to Selectable...

Schneider.
"Jared" <VB***********@email.com> wrote in message
news:10*************@corp.supernews.com...
do you have events inside your control? do they raise another event to

your
app? are they supposed to be handled inside your control? What are you
trying to accomplish? you should give more details, mabye some code.

"schneider" <00**@0000.SPAM> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> Yes,
> Tried both T/F.
>
> Schneider
>
>
> "Jared" <VB***********@email.com> wrote in message
> news:10*************@corp.supernews.com...
>> Is ths form's KeyPreview property set to true?
>>
>>
>> "schneider" <00**@0000.SPAM> wrote in message
>> news:%2****************@TK2MSFTNGP12.phx.gbl...
>> > I can't get any of the Key events to fire in my UserControl.
>> > The control only contains a few labels.
>> >
>> > This is really annoying..
>> >
>> > Anyone know whats going on?
>> >
>> > Thanks,
>> >
>> > Schneider
>> >
>> >
>>
>>
>
>



Nov 20 '05 #10

P: n/a
GOT IT!

what BS!

Need to call UserControl.Focus
Schneider

"schneider" <00**@0000.SPAM> wrote in message
news:#7**************@TK2MSFTNGP12.phx.gbl...
I can't get any of the Key events to fire in my UserControl.
The control only contains a few labels.

This is really annoying..

Anyone know whats going on?

Thanks,

Schneider

Nov 20 '05 #11

P: n/a
* "schneider" <00**@0000.SPAM> scripsit:
I posted to This thread, and Vb.Controls, you get different types of users,
and there is no specific control_Author for winforms like there is for ASP.


?!?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #12

P: n/a
Hi, Herfried

Ok what is main topic of Lang.Vb.Controls, is it for control development, or
on usage of existing controls. Seem most post are on usage of existing
framework controls.

I assume framwork.windowsforms.controls is on usage of thoes controls.

I'm thinking there should be the following:
dotnet.lang.wf.Controls (implementation of existing controls)
dotnet.lang.wf.InheritedControl_dev (derrived types)
dotnet.lang.wf.Controls_Development (Non inherited, new unique types)

As far as language, both would be nice, but I can live with-out it.

anyway, just my thoughts...

Schneider

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2i************@uni-berlin.de...
* "schneider" <00**@0000.SPAM> scripsit:
I posted to This thread, and Vb.Controls, you get different types of users, and there is no specific control_Author for winforms like there is for
ASP.
?!?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #13

P: n/a
* "schneider" <00**@0000.SPAM> scripsit:

First of all, please don't mention my name to the subject of your
message.
Ok what is main topic of Lang.Vb.Controls, is it for control development, or
on usage of existing controls. Seem most post are on usage of existing
framework controls.

I assume framwork.windowsforms.controls is on usage of thoes controls.
That's what many questions there are currently about, but I don't think
that questions on how to develop controls are off-topic there. IMO,
they are on-topic in the controls group. Notice that this is my
opinion, I don't know what purpose was assigned to the group by
Microsoft.
I'm thinking there should be the following:
dotnet.lang.wf.Controls (implementation of existing controls)
dotnet.lang.wf.InheritedControl_dev (derrived types)
dotnet.lang.wf.Controls_Development (Non inherited, new unique types)

As far as language, both would be nice, but I can live with-out it.


There is few "traffic" in the controls group at the moment, much fewer
than in this group, so I don't see a reason for splitting the groups
up. Most people don't care about specialized groups at all, as you can
see on this group. It's currently flooded with database and control
related questions that would better fit into the ADO.NET or Windows
Forms (controls) groups.

Just my 2 Euro cents...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #14

P: n/a
Ok, why so hostile..

Everyone having a bad day arround here, I'm just trying to help.

Schneider

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2i************@uni-berlin.de...
* "schneider" <00**@0000.SPAM> scripsit:

First of all, please don't mention my name to the subject of your
message.
Ok what is main topic of Lang.Vb.Controls, is it for control development, or on usage of existing controls. Seem most post are on usage of existing
framework controls.

I assume framwork.windowsforms.controls is on usage of thoes controls.


That's what many questions there are currently about, but I don't think
that questions on how to develop controls are off-topic there. IMO,
they are on-topic in the controls group. Notice that this is my
opinion, I don't know what purpose was assigned to the group by
Microsoft.
I'm thinking there should be the following:
dotnet.lang.wf.Controls (implementation of existing controls)
dotnet.lang.wf.InheritedControl_dev (derrived types)
dotnet.lang.wf.Controls_Development (Non inherited, new unique types)

As far as language, both would be nice, but I can live with-out it.


There is few "traffic" in the controls group at the moment, much fewer
than in this group, so I don't see a reason for splitting the groups
up. Most people don't care about specialized groups at all, as you can
see on this group. It's currently flooded with database and control
related questions that would better fit into the ADO.NET or Windows
Forms (controls) groups.

Just my 2 Euro cents...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #15

P: n/a
Hi Schneider,

I was reading the message from Herfried and thought what a friendly good and
not direct only his own idea's telling message, is this Herfried.

I see seldom such nice messages from Herfried when it is not direct to the
language subject. (Not that he is meaning the other ones agresive, however I
can see he took some time for it, and thought probably a to a German
speaker)

And than you call it hostile

(What you could say from calling his name, in which he was right, I do it
myself sometimes, however only to get some extra attention from someone from
which I know that he knows the answer when the subject is totally different
from the question).

I hope that Herfried (for his own welfare) is using in future this style he
used to you more.

I was afraid your message about hostile would give Herfried the wrong idea
when I did not write this.

(When he had added in the last sentence as well IMO it was even better).

Cor
"schneider" <00**@0000.SPAM> schreef in bericht
news:Ob**************@TK2MSFTNGP09.phx.gbl...
Ok, why so hostile..

Everyone having a bad day arround here, I'm just trying to help.

Schneider

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2i************@uni-berlin.de...
* "schneider" <00**@0000.SPAM> scripsit:

First of all, please don't mention my name to the subject of your
message.
Ok what is main topic of Lang.Vb.Controls, is it for control development, or on usage of existing controls. Seem most post are on usage of existing
framework controls.

I assume framwork.windowsforms.controls is on usage of thoes controls.


That's what many questions there are currently about, but I don't think
that questions on how to develop controls are off-topic there. IMO,
they are on-topic in the controls group. Notice that this is my
opinion, I don't know what purpose was assigned to the group by
Microsoft.
I'm thinking there should be the following:
dotnet.lang.wf.Controls (implementation of existing controls)
dotnet.lang.wf.InheritedControl_dev (derrived types)
dotnet.lang.wf.Controls_Development (Non inherited, new unique types)

As far as language, both would be nice, but I can live with-out it.


There is few "traffic" in the controls group at the moment, much fewer
than in this group, so I don't see a reason for splitting the groups
up. Most people don't care about specialized groups at all, as you can
see on this group. It's currently flooded with database and control
related questions that would better fit into the ADO.NET or Windows
Forms (controls) groups.

Just my 2 Euro cents...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>


Nov 20 '05 #16

P: n/a
Thats fair,

I did not want to offend anyone either,
we can close this thread now..

Thanks, Everyone

Schneider

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:eS*************@TK2MSFTNGP12.phx.gbl...
Hi Schneider,

I was reading the message from Herfried and thought what a friendly good and not direct only his own idea's telling message, is this Herfried.

I see seldom such nice messages from Herfried when it is not direct to the
language subject. (Not that he is meaning the other ones agresive, however I can see he took some time for it, and thought probably a to a German
speaker)

And than you call it hostile

(What you could say from calling his name, in which he was right, I do it
myself sometimes, however only to get some extra attention from someone from which I know that he knows the answer when the subject is totally different from the question).

I hope that Herfried (for his own welfare) is using in future this style he used to you more.

I was afraid your message about hostile would give Herfried the wrong idea
when I did not write this.

(When he had added in the last sentence as well IMO it was even better).

Cor
"schneider" <00**@0000.SPAM> schreef in bericht
news:Ob**************@TK2MSFTNGP09.phx.gbl...
Ok, why so hostile..

Everyone having a bad day arround here, I'm just trying to help.

Schneider

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2i************@uni-berlin.de...
* "schneider" <00**@0000.SPAM> scripsit:

First of all, please don't mention my name to the subject of your
message.

> Ok what is main topic of Lang.Vb.Controls, is it for control

development, or
> on usage of existing controls. Seem most post are on usage of existing > framework controls.
>
> I assume framwork.windowsforms.controls is on usage of thoes controls.
That's what many questions there are currently about, but I don't think that questions on how to develop controls are off-topic there. IMO,
they are on-topic in the controls group. Notice that this is my
opinion, I don't know what purpose was assigned to the group by
Microsoft.

> I'm thinking there should be the following:
> dotnet.lang.wf.Controls (implementation of existing controls)
> dotnet.lang.wf.InheritedControl_dev (derrived types)
> dotnet.lang.wf.Controls_Development (Non inherited, new unique types) >
> As far as language, both would be nice, but I can live with-out it.

There is few "traffic" in the controls group at the moment, much fewer
than in this group, so I don't see a reason for splitting the groups
up. Most people don't care about specialized groups at all, as you can see on this group. It's currently flooded with database and control
related questions that would better fit into the ADO.NET or Windows
Forms (controls) groups.

Just my 2 Euro cents...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>



Nov 20 '05 #17

This discussion thread is closed

Replies have been disabled for this discussion.