Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / October 2004

Tip: Looking for answers? Try searching our database.

using F7 as shortcort doesn't work?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Torben Jensen - 18 Oct 2004 11:15 GMT
Hi,

I am having trouoble using the F-kesy as shortcuts.

The shortcut is defines like this (c#):

btnRun.Shortcut = Shortcut.F7;

I have provided the button with a valid eventhandler that works just fine
when pressing the button, but pressing the F7 key doesn't trigger anything
at all.
All my other shortcuts that doesn't use F-keys are defined in the same and
they work just fine.

Has anyone experinced the same problems and maybe found a solution?

Thank you.
Torben
Sijin Joseph - 18 Oct 2004 11:55 GMT
Use the Form.KeyPreview property, set it to true and in the forms
KeyPress eventhandler fire your button click.

http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwindowsformsformcl
asskeypreviewtopic.asp


Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

> Hi,
>
[quoted text clipped - 14 lines]
> Thank you.
> Torben
cblicher - 18 Oct 2004 14:52 GMT
Sorry, I might have expressed my self wrong, and I now see why.

I did not mean that I was using the F7 key as an accerator for a
buttonclick.  I want to associate the F7 key to one of my menuitems.

itmRun.Shortcut = shortcut.F7;

All shortcuts for my menuitems using the F-keys doesn't work while the
ones using e.g. the ctrl key works just fine.

Does anybody have an idea why this seems to be a problem?

Thank you.

Torben

> Use the Form.KeyPreview property, set it to true and in the forms
> KeyPress eventhandler fire your button click.
[quoted text clipped - 4 lines]
> http://www.indiangeek.net
> http://weblogs.asp.net/sjoseph
cblicher - 18 Oct 2004 15:11 GMT
After further investigation, it seems that this is an MDI problem. It
seem that menues in MDI child forms are not included in the processing
of menu shortcuts.

Does anyone have a solution for this ?

> Sorry, I might have expressed my self wrong, and I now see why.
>
[quoted text clipped - 20 lines]
>> http://www.indiangeek.net
>> http://weblogs.asp.net/sjoseph

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.