473,395 Members | 1,452 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.

Handle Keypress on FormLevel

Hi

Can i handle keypress on a form-level, with no regard to wath control has
focus and which tabcontrol is visible???

If so, could you include sample code with weight on F-keys and key-codes in
general

/Finn
Feb 26 '07 #1
2 1493
Forgot to say, that i'm using VB.NET 2003

/Finn
"Finn Stampe Mikkelsen" <st****@city.dkskrev i en meddelelse
news:OT*************@TK2MSFTNGP06.phx.gbl...
Hi

Can i handle keypress on a form-level, with no regard to wath control has
focus and which tabcontrol is visible???

If so, could you include sample code with weight on F-keys and key-codes
in general

/Finn

Feb 26 '07 #2
On Feb 25, 6:35 pm, "Finn Stampe Mikkelsen" <sta...@city.dkwrote:
Forgot to say, that i'm using VB.NET 2003

/Finn

"Finn Stampe Mikkelsen" <sta...@city.dkskrev i en meddelelsenews:OT*************@TK2MSFTNGP06.phx.gb l...
Hi
Can i handle keypress on a form-level, with no regard to wath control has
focus and which tabcontrol is visible???
If so, could you include sample code with weight on F-keys and key-codes
in general
/Finn
Set the Form's KeyPreview property to True and then handle the
KeyPress, KeyDown, KeyUp events as required.
Feb 26 '07 #3

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

Similar topics

3
by: Darryn Ross | last post by:
Hi, I am trying to catch the KeyPress event on my datagrid but it isn't working... i have also tried registering the handler with the event like this... dgGLBatch.KeyPress += new...
0
by: Coder | last post by:
hi, i am using a c# windows application. i want to handle some keypress events like ctrl+A, shift+enter, etc.. is it easy to handle only one keypress; as KeyPressEventArgs e;... e.KeyPress. ...
3
by: Coder | last post by:
hi, there is still no answer, i wonder if there is a way to handle the multiple key-press event on a C# windows form, like "Ctrl+Enter"
2
by: rege | last post by:
Hi, I have two applications developed in C# say A and B. When user presses key "L" with applicaition A active , it causes a keypress event which causes application B to run. Application A then...
1
by: Rene | last post by:
Hi, I am running is some problems with the KeyPreview and KeyPress events. The KeyPress event is only triggered when there this an focusable control on the form. When all controls are disabled...
15
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE...
1
by: J. Moreno | last post by:
I have an event handler (for keypress) and I want to use it multiple forms. What's the best way of doing this? I tried using Public Sub cmbHandleKeyPress _ (Byval Sender as Object, ByVal e...
0
by: Terry Reedy | last post by:
rishi pathak wrote: Does not work on Windows, at least with 3.0, as tty fails trying to import termios. There, use msvcrt module "msvcrt.kbhit() Return true if a keypress is waiting to be...
3
by: chris52672 | last post by:
If I have text box 1 (Password Enter) and I have text box 2 (Password Reneter). After text has been entered in text box 1 and the enter key is pressed to make text box 2 active (the curser will...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.