473,388 Members | 1,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Usercontrol don't raises keyDown event

Hi All.

I'm developing a usercontrol that have no controls inside him, just showing
scrollbars when needed. All the rest of interface is done with graphics
object.

The problem is, now I need to capture keyboard events inside the control,
but it not raises so I can work with the keys.

(for sample, if there are scrollbars visible and I press
Up/Left/Right/Bottom keys, a scrollbar get focus. If there are no scrollbars
visible, the focus is transfered to next control of the form that is hosting
my usercontrol)

How can I fix that?

Ps.: I'm using Framework 1.1
[]s
Cesar
Nov 21 '05 #1
2 2048
Found it! Just needed override the IsInputKey() method and it is done!

[]s
Cesar

"Ronchese" <ro******@smlinfo.com.br> escreveu na mensagem
news:OO**************@TK2MSFTNGP10.phx.gbl...
Hi All.

I'm developing a usercontrol that have no controls inside him, just showing
scrollbars when needed. All the rest of interface is done with graphics
object.

The problem is, now I need to capture keyboard events inside the control,
but it not raises so I can work with the keys.

(for sample, if there are scrollbars visible and I press
Up/Left/Right/Bottom keys, a scrollbar get focus. If there are no scrollbars
visible, the focus is transfered to next control of the form that is hosting
my usercontrol)

How can I fix that?

Ps.: I'm using Framework 1.1
[]s
Cesar

Nov 21 '05 #2
Found it! Just needed override the IsInputKey() method and it is done!

[]s
Cesar

"Ronchese" <ro******@smlinfo.com.br> escreveu na mensagem
news:OO**************@TK2MSFTNGP10.phx.gbl...
Hi All.

I'm developing a usercontrol that have no controls inside him, just showing
scrollbars when needed. All the rest of interface is done with graphics
object.

The problem is, now I need to capture keyboard events inside the control,
but it not raises so I can work with the keys.

(for sample, if there are scrollbars visible and I press
Up/Left/Right/Bottom keys, a scrollbar get focus. If there are no scrollbars
visible, the focus is transfered to next control of the form that is hosting
my usercontrol)

How can I fix that?

Ps.: I'm using Framework 1.1
[]s
Cesar

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: steve bull | last post by:
I created a usercontrol class, RGBColorSpace, which is derived from an abstract class, ColorSpace, but when I try to click on the design panel for the control I get an error message "Unable to...
7
by: Colin Young | last post by:
I have a UserControl that contains a calendar control. The calendar is not raising events (month navigation, date selections, etc.). I've checked that the OnSelectionChanged event has a handler...
2
by: Craig Douthitt via DotNetMonster.com | last post by:
I am trying to capture an buttonclick on a usercontrol in the webform the usercontrol resides in. After researching this issue, I've come to believe that the best way of handling this is by raising...
1
by: Lin | last post by:
Hi All, I have a UserControl and in the UserControl I have a few controls (textbox buttons ect.) and I want to know how can I fire the "onchange" event (of the usercontrol) when the textbox in...
16
by: schneider | last post by:
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
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
0
by: Ronchese | last post by:
Hi All. I'm developing a usercontrol that have no controls inside him, just showing scrollbars when needed. All the rest of interface is done with graphics object. The problem is, now I need...
3
by: Simon Verona | last post by:
Sorry for the repost, but this group seems to be more "active" than the group that I posted my question, and it's probably as valid here as there! I have a usercontrol, which contains a textbox...
8
by: Tony Johansson | last post by:
Hello! I wonder can somebody explain when is it suitable to use these methods OnKeyUp, OnKeyDown and OnKeyPress because these raise an event. These are located in class UserControl. If these...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.