还有怎样设置label的快捷键

解决方案 »

  1.   

    在FORM的FormKeyDown裡寫吧!
    如果是F1,F2調用BUTTON的CLICKif (Key = VK_F1) then
       Button1Click(Sender);
      

  2.   

    ActionList控件,他就在Standard页
    双击空间,在其中加入一条Action1,将Action1事件属性OnExecute指向你的Button1Click事件,设置shortcut属性为你的快捷键即可。
      

  3.   

    The RegisterHotKey function defines a hot key for the current thread. BOOL RegisterHotKey(    HWND hWnd, // window to receive hot-key notification
        int id, // identifier of hot key
        UINT fsModifiers, // key-modifier flags
        UINT vk  // virtual-key code
       );
     ParametershWndIdentifies the window that will receive WM_HOTKEY messages generated by the hot key. If this parameter is NULL, WM_HOTKEY messages are posted to the message queue of the calling thread and must be processed in the message loop. idSpecifies the identifier of the hot key. No other hot key in the calling thread should have the same identifier. An application must specify a value in the range 0x0000 through 0xBFFF. A shared dynamic-link library (DLL) must specify a value in the range 0xC000 through 0xFFFF (the range returned by the GlobalAddAtom function). To avoid conflicts with hot-key identifiers defined by other shared DLLs, a DLL should use the GlobalAddAtom function to obtain the hot-key identifier. fsModifiersSpecifies keys that must be pressed in combination with the key specified by the nVirtKey parameter in order to generate the WM_HOTKEY message. The fsModifiers parameter can be a combination of the following values: Value Meaning
    MOD_ALT Either ALT key must be held down.
    MOD_CONTROL Either CTRL key must be held down.
    MOD_SHIFT Either SHIFT key must be held down.
     vkSpecifies the virtual-key code of the hot key. 用这个简单好用!
      

  4.   

    用API,RegisterHotKey();
    比如热键为F5执行button的单击事件 参数怎么设置啊