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 can I read the header of request to webserver
- Receiving Notifications for Individual Task Completion OmniThreadLibrary Parallel.ForEach
- Delphi - How to get result of function from QuickReport without viewing a report?
- Out of memory while adding documents to a Firebird BLOB field with Delphi
- How to MakeScreenshot fullpage on Delphi
- How to program a COM object with an IEnumerator, IEnumerable interface inside
- How to Dynamically Add Controls to Delphi Form
- How to write a string in Stringrid with DelimitedText in FMX Delphi 11
- TGrid/TStringGrid multi cell selection / multi editing in delphi firemonkey (12)
- How to localize "Today" in the Delphi TMonthCalendar?
- How can I call a SOAP webserver method in Vue.js?
- Efficiently Handling Large Number of API Calls with Delphi 10.4 and OmniThreadLibrary
- Delphi can not compile the unit create by its "XML Data Binding Wizard"
- Save Form Properties in File and then restore those Properties after reopening
- Is it possible to open a blob without saving it to file
Related Questions in MENU
- i want to create a drop down menu for blogger
- Good practices for variables in Laravel's layout files
- CSS - Change Margin of a Menu's Items..?
- Data structure for a console menu in Node.js with nested options that can be navigated backwards
- links on elementor modal not working on click
- Accordion menu doesnt appear in frontpage
- Detection of focus change events when `WM_KILLFOCUS` and `WM_SETFOCUS` do not arrive
- How to automatically close mobile menu on scroll in website
- burger-menu bug with react (flickering)
- Menu and logo disappeared from the header in WordPress
- {Solved} Menu items spread out when expanding the menu. WPF Application
- Tkinter menu does not appear
- Curved Carrousel
- Not able to build menus in Wordpress
- Astra Theme Mobile Menu Pushes Content Downward
Related Questions in SHORTCUT
- How when click button order in custom siri intents make custom action
- Set default (custom value) in iOS AppIntent parameter
- Activating a Shortcut on 'hot-corner'
- How to assign keyboard shortcut for arrow keys in Visual Studio Code
- Custom Keyboard Shortcuts in Flutter for returning an independent widget
- Is there any way to make tkinter window dismiss Win + D command?
- Windows shortcut target field, change to current directory
- How can I create a .desktop file [Desktop Entry] that executes a command in the current directory?
- How to restore data of a shortcut file
- Create windows executable shortcuts for given bash commands
- Google Meet PWA with StartParameters?
- How automatically add comments in the start and end of an HTML block using a shortcut
- Autohotkey two buttons pressed result in third button
- Assign shortcut to macro/module in MS-Project?
- MacOS Safaris WebApp to App feature fullscreen metatags
Related Questions in TACTION
- FMX how to cast Tbutton and assigning it with Tag in TAction / TActionList?
- how do I override a standard action
- FMX - TAction OnUpdate doesn't work
- How to avoid repeating execution of TAction.Shortcut?
- Delphi default dataset action Tdatasetdelete
- How to get TActionMainMenuBar drop down items to scroll when there are too many items to show
- Does TAction.OnUpdate event degrade the performance?
- toolbutton with action created at runtime
- How to cast to TMenuItem in TActions Execute method?
- Why are : visible, control assigned TActions affecting the CPU usage of the application?
- Use TAction for an "icon only" TButton
- Changing font of TActionMainMenuBar when using Vcl styles
- How to obtain all TAction from a TActionManager?
- Add new property to Action in TActionList
- TActionManager in MDI application. Losing actions
Related Questions in TMENUITEM
- Styling menu size with FireMonkey
- CBuilder TMenu showing in wrong place
- How to draw transparent bitmap from ImageList on TMenuItem?
- Howto create same style of tMenuItem with AdvancedDrawItem?
- How to find TMainMenu parent of TMenuItem?
- Delphi firemonkey how to remove a menuitem programmatically?
- Creating a Delphi app shortcut with no corresponding menu item
- In Lazarus, how to check whether a MenuItem has a Bitmap assigned?
- Delphi: How to Assign an Up Arrow Keyboard Shortcut to Action/MenuItem, and Keep It Actual for Navigating the List Control (ListBox/VTV)?
- Sending WM_COMMAND to a TMenuItem
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 # Hahtags
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