473,378 Members | 1,382 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,378 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 2047
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.