似乎不行,帮忙看看<br>procedure WMKeyDown(var Msg:TMsg); message WM_SYSKEYDOWN;<br>procedure WMCommand(var Msg:TWMCommand); Message WM_COMMAND;<br>..........<br>..........<br>var<br> MenuAccel:HACCEL;<br>procedure TForm1.FormCreate(Sender: TObject);<br>begin<br>MenuAccel:=LoadAccelerators(HInstance,MAKEINTRESOURCE(110));<br>end;<br>..........<br>..........<br>procedure TForm1.WMKeyDown(var Msg: TMsg);<br>begin<br> while GetMessage(Msg,0,0,0) do begin<br> if not Boolean(TranslateAccelerator(Msg.hwnd,MenuAccel,Msg)) then<br> begin<br> TranslateMessage(Msg);<br> DispatchMessage(Msg);<br> end;<br> end;<br>end;<br><br>procedure TForm1.WMCommand(var Msg:TWMCommand);<br>begin<br> inherited<br> case Msg.ItemID of<br> 20102:showmessage('20102');<br> 20103:showmessage('20103');<br> 20104:showmessage('20104');<br> end;<br>end;