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

how to create shift-F2 function for Textbox - shortcutkey?

Hello,

I need to add a shift-F2 function to textboxes to bring up a dialogform
with the expanded text contained in the respective Textbox. On any of the
keydown events of a textbox I can only trap for one key - well, I only know
how to trap for one key. How can I trap for Shift-F2 combination? I see
that menuItems have shortcutkey options. How can I create similar
functionality for the textbox control?

Thanks,
Rich
Jun 30 '06 #1
3 2593
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.Shift And e.KeyCode = Keys.F2 Then
MsgBox("")
End If
End Sub
Rich wrote:
Hello,

I need to add a shift-F2 function to textboxes to bring up a dialogform
with the expanded text contained in the respective Textbox. On any of the
keydown events of a textbox I can only trap for one key - well, I only know
how to trap for one key. How can I trap for Shift-F2 combination? I see
that menuItems have shortcutkey options. How can I create similar
functionality for the textbox control?

Thanks,
Rich


Jun 30 '06 #2
Many thanks. That was just what I was looking for.

Rich

"Ahmed" wrote:
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.Shift And e.KeyCode = Keys.F2 Then
MsgBox("")
End If
End Sub
Rich wrote:
Hello,

I need to add a shift-F2 function to textboxes to bring up a dialogform
with the expanded text contained in the respective Textbox. On any of the
keydown events of a textbox I can only trap for one key - well, I only know
how to trap for one key. How can I trap for Shift-F2 combination? I see
that menuItems have shortcutkey options. How can I create similar
functionality for the textbox control?

Thanks,
Rich


Jun 30 '06 #3
Rich,
In addition to the KeyDown event, I would consider using the ProcessCmdKey
instead.

http://support.microsoft.com/default...en-us%3B320583

As it allows you to capture keys that may not show up in the KeyDown
event...

--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Rich" <Ri**@discussions.microsoft.com> wrote in message
news:84**********************************@microsof t.com...
| Hello,
|
| I need to add a shift-F2 function to textboxes to bring up a dialogform
| with the expanded text contained in the respective Textbox. On any of the
| keydown events of a textbox I can only trap for one key - well, I only
know
| how to trap for one key. How can I trap for Shift-F2 combination? I see
| that menuItems have shortcutkey options. How can I create similar
| functionality for the textbox control?
|
| Thanks,
| Rich
|
|
Jul 1 '06 #4

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

Similar topics

5
by: Alex Stevens | last post by:
Hi All, I'm writing a launcher program which checks for updates and copies them down to the client. However, I would like the user to be able to modify the settings for the launcher. As this...
4
by: Glen Able | last post by:
Just to get my head straight on this... Firstly, am I right in thinking that right-shifting a signed integer has an undefined result (i.e. could be implemented as a logical or arithmetic shift)?...
6
by: PerryC | last post by:
I have search googles and there are hundreds of tips about AllowByPassKey... however, none works for me... well, perhaps I am too new to such high level functionality that it just does not make...
388
by: maniac | last post by:
Hey guys, I'm new here, just a simple question. I'm learning to Program in C, and I was recommended a book called, "Mastering C Pointers", just asking if any of you have read it, and if it's...
43
by: Mehta Shailendrakumar | last post by:
Hello, Can anyone suggest me operator to perform arithmetic shift in C? May it be for a perticular compiler. Thank you in advance. Regards, Shailendra
9
by: badboybrown | last post by:
Hello, Is it possible to step through the "Create MDE" process and see what is causing Access to crash? I tried, unsuccessfully, many times to create an MDE from my database. But, randomly, I...
2
by: sytemper | last post by:
I write a keydown KeyDown event to catch if tab is press or tab+shift is press.And i already override the IsInputKey method. But noe i only can get the tab but no shift+tab. When shift+tab is...
3
by: Amy Smith | last post by:
Hello there, I am having a small problem which been challenging me for few days and need help or advice. I am trying to calculate the day-shift for employees based on the time they started and...
4
by: Felix Kater | last post by:
Hi, when I use something like int Shift= 3; long Value= 1 << Shift; What is the data type of the const value '1' here? In other terms: What is the possible maximum of 'Shift' here?
4
by: npankajk | last post by:
Hi, My requirement is to create 75000 files. I have a perl script to create files , it is working fine for small number of files but the script is exiting while creating large number of...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.