473,395 Members | 1,972 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,395 software developers and data experts.

problem in catching the keys pressed on combo box

I placed a combobox control on User control and this user control was placed
on a form and I tried to catch the keys pressed on that combo box, but I am
unable to do it. I set the property of keypreview to true.
But when I do the same for text box it is working fine.

After that I placed the combo box control on the form itself and done the
same then also I wasn't able to get the keys pressed on that control. Is
this problem with the combo box control in .NET?
--
Bye For Now,
Chandu.
Nov 15 '05 #1
1 1446
The keypress event of the combobox is called but in the scope of the User
control.
I had the same problem, so in my event handler for the keypress event (on
the user control) I
raised another event (my custom event) to which the form was subscribed
to...

One other thing... If you are going to have just one combobox or textbox on
the User control it really doesn't
pay to use it... Make "MyComboBox", which inherits from ComboBox...

saso

"Nagachandra Sekhar Grandhi" <gn*****@hotmail.com> wrote in message
news:O$**************@TK2MSFTNGP09.phx.gbl...
I placed a combobox control on User control and this user control was placed on a form and I tried to catch the keys pressed on that combo box, but I am unable to do it. I set the property of keypreview to true.
But when I do the same for text box it is working fine.

After that I placed the combo box control on the form itself and done the
same then also I wasn't able to get the keys pressed on that control. Is
this problem with the combo box control in .NET?
--
Bye For Now,
Chandu.

Nov 15 '05 #2

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

Similar topics

0
by: Tim Bücker | last post by:
Hello. I have a mdi form with a toolbar including a combo box. Through this combo box some kind of shapes can be selected. These shapes reside on the mdi child forms and can be moved around with...
3
by: Vadim Rapp | last post by:
Hi: On my form, I have textbox and combo box. Form's KeyPreview = True. It does work for the textbox, but not for the combo. I.e. Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As...
9
by: OpticTygre | last post by:
How would I be able to capture multiple key presses, such as Alt+Shift+D in a form's KeyPress and KeyDown events? Thanks in advance. -Jason
5
by: iwdu15 | last post by:
hi, im making a program that makes a picturebox move according to key presses...but what if the user pushes say down and right at the same time. the keypress event only responds to once key...
2
by: _DD | last post by:
I'm trying to gracefully intercept Control and Alt keys for mouse events within a Panel. I realize that keyboard is not normally relevant there, but in this case, I need to get...
4
by: Andrés G. Aragoneses [ knocte ] | last post by:
Hello. I am trying to catch the ALT key (but not as a modifier, but as a single key clicked) on a Console application, but neither Read(), ReadLine() nor ReadKey() catch it, how can I do it using...
4
by: boopsboops | last post by:
Hi thescripts people, I hope I'm in the right forum for Visual Basic Dotnet (VS 2005). I am trying to make a custom control in which you can nudge a point around using the arrow keys. Actually,...
3
rhitam30111985
by: rhitam30111985 | last post by:
Hi all.. i am trying to create a combo with the pop down list being modfied in real time as i type each character : import gtk window=gtk.Window(gtk.WINDOW_TOPLEVEL)...
2
by: John | last post by:
Hi How can I capture control keys Ctrl-A, Ctrl-B, Ctrl-C etc. in a form? Thanks Regards
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...
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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.