|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How program function keys (e.g. F1, F2) in Windows app?I'm writing a Windows app and want to associate function keys with some of
my menu items (e.g. Help (F1)) and buttons. How can I do this, please? Thanks. "Ronald S. Cook" <rc***@westinis.com> schrieb: Menu items have a 'Shortcut' property which can be used to assign keyboard > I'm writing a Windows app and want to associate function keys with some of > my menu items (e.g. Help (F1)) and buttons. shortcuts to them. Buttons support shortcuts by embedding an ampersand character in their 'Text' property value, such as "&Save", which will make Alt+S raise the button's 'Click' event. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> "Ronald S. Cook" <rc***@westinis.com> schrieb Set the Shortcuts property for menus. Handle the KeyDown event at form level > I'm writing a Windows app and want to associate function keys with > some of my menu items (e.g. Help (F1)) and buttons. How can I do > this, please? (KeyPreview = True) to handle them without a menu. Armin So how can I assign a function key (e.g. F3) to a button?
Thanks. Show quoteHide quote "Armin Zingler" <az.nospam@freenet.de> wrote in message news:OTJl4YtTGHA.5464@TK2MSFTNGP10.phx.gbl... > "Ronald S. Cook" <rc***@westinis.com> schrieb >> I'm writing a Windows app and want to associate function keys with >> some of my menu items (e.g. Help (F1)) and buttons. How can I do >> this, please? > > > Set the Shortcuts property for menus. Handle the KeyDown event at form > level (KeyPreview = True) to handle them without a menu. > > > Armin "Ronald S. Cook" <rc***@westinis.com> schrieb You can not assign a function key to a button. You can handle the key at > So how can I assign a function key (e.g. F3) to a button? Form level and call the same procedure that is called when the button is clicked. see also: http://support.microsoft.com/default.aspx?scid=kb;en-us;839201 http://msdn.microsoft.com/library/en-us/vbcon/html/vbconMouseKeyboardInteractions.asp Armin You can also use mybutton.performclick.
-- Show quoteHide quoteDennis in Houston "Armin Zingler" wrote: > "Ronald S. Cook" <rc***@westinis.com> schrieb > > So how can I assign a function key (e.g. F3) to a button? > > You can not assign a function key to a button. You can handle the key at > Form level and call the same procedure that is called when the button is > clicked. > > > see also: > > http://support.microsoft.com/default.aspx?scid=kb;en-us;839201 > > > http://msdn.microsoft.com/library/en-us/vbcon/html/vbconMouseKeyboardInteractions.asp > > > > Armin > > "Dennis" <Den***@discussions.microsoft.com> schrieb Yes, you can, but I never suggest it because no button has been clicked.> You can also use mybutton.performclick. Armin
need help on bitblt
Installation Error: Application validation did not succeed. Unable to continue what is Xtreme Sample Database Serializing custom properties on a BindingList. Small bit of code from VB6 to VB.net - desperate need of help BackgroundWorker and 'freezing' application Multithreading and ActiveX how to capture print message set back ground image to stretch Icon |
|||||||||||||||||||||||