473,403 Members | 2,293 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,403 software developers and data experts.

I need to capture the "Ctrl+F4" in widows application

Hi all

Just i want capture the with "Ctrl" (Key bord function) + any F1 or F4

In windows application How can capture the event in C# .net

Regards,
Venu
Nov 16 '05 #1
1 5689
Put this inside your Form class:

--<code>------------------------------------
protected override bool ProcessDialogKey(Keys keyData)
{
switch (keyData)
{
case (Keys.Control | Keys.F4):
MessageBox.Show("You pressed Crtl-F4");
return true; // Tell the caller that the key has been handled
case (Keys.Control | Keys.F1):
MessageBox.Show("You pressed Crtl-F1");
return true;
};
// If the key hasn't been used by you then pass it to the base class
return base.ProcessDialogKey(keyData);
}
--<end code>------------------------------------

More reading here:
http://www.ondotnet.com/pub/a/dotnet...4/29/keys.html

regards, Teis

"karunakar" <ka***********@stcroixsystems.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
Hi all

Just i want capture the with "Ctrl" (Key bord function) + any F1 or F4

In windows application How can capture the event in C# .net

Regards,
Venu

Nov 16 '05 #2

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

Similar topics

2
by: Paul Brady | last post by:
I have non-computer skilled users entering data into a form. There are certain ranges of values which, if they enter them, make no sense in the application, but I can't test them until they try to...
6
by: daFritz | last post by:
Hi! I need to prevent Task-Switching in my App, so I tried to implement a low level keyboard hook in a extra class. But it seems that the Parameters are not passed correctly to my Hook function....
0
by: karunakar | last post by:
Hi all Just i want capture the with "Ctrl" (Key bord function) + any F1 or F4 In windows application How can capture the event in C# .net Regards, Venu
7
by: Michael Maes | last post by:
Hello, ALT+F4 is the shortcut to close a form. When I use this shortcut in an MDI enviroment, the application is closed, so obviously the shortcut applies to the 'Container' and not to the...
5
by: jcrouse | last post by:
I have an application thats a viewer. I also have a form that is fired from a Tools/Options menu selection. In the Options form the user can select a hotkey to use to exit the main viewer...
2
by: ApexData | last post by:
Hello In order to control keyboard keystrokes in my application, I use the KeyPreview=Yes, OnKeyDown Events of every Form with great success. HOWEVER, these events are not available in REPORTS,...
3
by: Richard Lewis Haggard | last post by:
Is there an easy way to disable the hotkey sequence Control F4 or otherwise prevent the action from killing off MDI child windows in VS05/WinForms 2? I've already figured out how to get rid of the...
3
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I want to have following hotkey used in asp.net application, how to do this especially for F5? ESC F3 F4 F5 F6 F9 F10
1
by: vasanthiraajan | last post by:
I need to capture the "Ctrl+F4" in widows application
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.