How to use the shortcut keys in Host+dll mode

Source: Internet
Author: User
How to use the shortcut keys in Host+dll mode

Recently in a Host+dll plug-in system, each DLL module inherits a base class module Tbaseform, and then the base class module defines the F1, delete F2, change F3, check F4 and other functions, each function defines a shortcut key,

On the main program side through Pagecontrol to load each DLL module, the problem is, when I open more than one module, when I press F1, the system call is not my current active Tabsheet module, but the first open module of the new

function, the original shortcut key was registered after the first module, the module after the re-registration is invalid. Later thought of a method, is again Tabsheet Onhide event in the current module of the shortcut key cancellation, in the OnShow event

Then the current module of the shortcut key Association, after testing success!!! , the following is part of the code:

1 procedureTbaseform.bidingshortcut;//binding shortcut keys 2 begin 3Al_new. Shortcut:=texttoshortcut ('F5'); 4Al_edit. Shortcut:=texttoshortcut ('F6'); 5Al_Delete. Shortcut:=texttoshortcut ('F7'); 6Al_refdata. Shortcut:=texttoshortcut ('F8'); 7Al_query. Shortcut:=texttoshortcut ('F3'); 8Al_report. Shortcut:=texttoshortcut ('F2'); 9Al_Export. Shortcut:=texttoshortcut ('F10'); TenAl_import. Shortcut:=texttoshortcut ('F4');  OneAl_gridset. Shortcut:=texttoshortcut ('F9');  A End;  -  - procedureTbaseform.unbidingshortcut;//unbind shortcut keys  the begin  -Al_new. Shortcut:=texttoshortcut ('None');  -Al_edit. Shortcut:=texttoshortcut ('None');  -Al_Delete. Shortcut:=texttoshortcut ('None');  +Al_refdata. Shortcut:=texttoshortcut ('None');  -Al_query. Shortcut:=texttoshortcut ('None');  +Al_report. Shortcut:=texttoshortcut ('None');  AAl_Export. Shortcut:=texttoshortcut ('None');  atAl_import. Shortcut:=texttoshortcut ('None');  -Al_gridset. Shortcut:=texttoshortcut ('None');  - End;

The Onhide and OnShow in the host program are then called Unbidingshortcut and Bidingshortcut respectively.

There is a base class conversion process, because I saved the current form in Tabsheet's tag beforehand, so just make the following conversions:

Tbaseform (Tabsheet.tag). Bidingshourtcut can do it.

The above describes how to use the shortcut keys in the Host+dll mode, including the use of shortcut keys, I hope the PHP tutorial interested in a friend helpful.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.