I want to have a shortcut key combination (like Ctrl+Alt+D) in my app to invoke a function, but I don't want the shortcut to appear on any menu. Is it possible to have a shortcut available in your app that is otherwise invisible?
Creating a Delphi app shortcut with no corresponding menu item
4.5k Views Asked by rossmcm At
2
There are 2 best solutions below
0
Giacomo Degli Esposti
On
Yes it's possible. You must add an Object of class TAction to your form. You can specify a keyboard shortcut for the Taction and then put your code in event OnExecute of the TAction.
Note that you cannot add a Taction directly to your form, you must put a TactionList on your form and then you can add a Taction to your TActionList.
Related Questions in DELPHI
- How to not load all database records in my TListbox in Firemonkey Delphi XE8
- How to catch WM_DEVICECHANGE in a control other than TForm?
- show information with Rolling / moving messages delphi xe7
- What is the different between "Console target" and "GUI target" in DCC32 option?
- How to add new online ressources to RAD Studio help system
- C# and Delphi code have different behaviour when importing unmanaged dll
- Loop through records on a cxgrid and update a field/column
- Delphi 7 - Save to a Specific .INI Files Name
- TImagelist for large images
- how to modify a function so it returns an array of strings
- Checking for internet connection in runtime
- How can I make the main form align correctly after my control height is autosized and then I maximize the form?
- fetch data from web service to dataset in Delphi
- Load candlestick data from file
- Infinite loop in parsing a string using pointer math
Related Questions in MENU
- moving a check box in html list and moving it
- Android toolbar context menu for listview items
- Joomla Get menu id from names
- How to add select menu in prestashop?
- Dynamic Menu in Qt Application
- Winforms remove controls on click
- CSS Menu system not working in IOS 8
- Polymer 1.0 How to vertical menu
- html css mega menu drop down
- How to add serial numbers to menu items in wordpress
- How to get HTML of a sidebar content in wordpress?
- Text on a menu becomes invisible
- Change Permalinks to Anchor Links When Using Bootstrap Navwalker
- Div ul list css menu
- Start onActivityResult not being called from menu option
Related Questions in SHORTCUT
- Context Menu ShortcutKeys do not work C#
- Create shortcut for specific activity on home screen
- mac Terminal app:what is the shortcut for "goto next tab"?
- What's the shortcut to interrupt the kernel in Canopy?
- Option + Shift on IntelliJ/Android Studio for Mac OS Yosemite
- Photoshop dialog controls keyboard shortcuts not working
- Intellij IDEA shortcuts vs Eclipse shortcuts
- what is "Right click" keyboard shortcut in Chrome
- Shortcut in Visual Studio - Windows Form Application while other Window is active
- File shortcut in Java
- Running Import-Module Active Directory for Script On Computer that has RSAT through Shortcut
- [Android][App]Error:(5) No resource identifier found for attribute 'shortcutId' in package 'android'
- Execute NPP-Shortcut with NPPexec
- Windows Shortcuts Created Programmatically Don't Work
- Bookmarklet to simulate button click in a Google service iframe
Related Questions in TACTION
- How to get TActionMainMenuBar drop down items to scroll when there are too many items to show
- TActionManager in MDI application. Losing actions
- Is there a way to override previous registred actions with a shortcut?
- How to obtain all TAction from a TActionManager?
- Changing font of TActionMainMenuBar when using Vcl styles
- How to add a drop down menu to an Action Item at Runtime
- Delphi XE - TRibbon actions always send focus to MainForm
- From TCheckListBox to TcxCheckListBox with an exception?
- extending the delphi TEditCopy action to also copy listbox items to clipboard
- Delphi 2009 Actionmanager default Imagelist
- Why are : visible, control assigned TActions affecting the CPU usage of the application?
- Delphi: How do I stop TAction shortcut keys autorepeating?
- How can I create a most recently used file list in Delphi 2009?
- How to assign TAction to toolbar button at runtime?
- Renaming TAction for another form
Related Questions in TMENUITEM
- Styling menu size with FireMonkey
- How to find TMainMenu parent of TMenuItem?
- Howto create same style of tMenuItem with AdvancedDrawItem?
- Delphi firemonkey how to remove a menuitem programmatically?
- Sending WM_COMMAND to a TMenuItem
- Creating a Delphi app shortcut with no corresponding menu item
- How to draw transparent bitmap from ImageList on TMenuItem?
- CBuilder TMenu showing in wrong place
- Delphi: How to Assign an Up Arrow Keyboard Shortcut to Action/MenuItem, and Keep It Actual for Navigating the List Control (ListBox/VTV)?
- In Lazarus, how to check whether a MenuItem has a Bitmap assigned?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
you can use the
OnShortCutevent of theTApplicationEventscomponent to this taskcheck this code