为啥Alt+1菜单组合键没反应?
为PopupMenu1中手动添加热键的代码:https://static.52pojie.cn/static/image/hrline/2.gif
procedure TForm5.FormCreate(Sender: TObject);
var
sState: TShiftState;
begin
Include(sState, ssCtrl);
CuiCui1.ShortCut := ShortCut(37, sState); //Ctrl←
Include(sState, ssAlt);
CuiCui2.ShortCut := ShortCut(49, sState); //Alt+1改成 Ctrl+1咋 就行了呢?{:301_974:}
end;
procedure TForm5.CuiCui1Click(Sender: TObject);
begin
ShowMessage('我是Ctrl←');
end;
procedure TForm5.CuiCui2Click(Sender: TObject);
var
sState: TShiftState;
begin
ShowMessage('我是Alt+1');
end; bindundun 发表于 2023-1-26 19:40
呃,英语啄实有点看不懂
拜托。。。就别献了。。。{:301_1008:} 可能两个键功能不一样,还要排除windows热键组合冲突
页:
[1]