A
amli
Unregistered / Unconfirmed
GUEST, unregistred user!
//還有
procedure THotKeyBtn.LoadHotKey;
var
Key: Word;
Shift: TShiftState;
begin
if not (csDesigning in ComponentState) and (FHotKey <> 0) and Assigned(Parent) then
begin
ShortCutToKey(FHotKey, Key, Shift);
if Shift = [ssShift] then
RegisterHotKey(Handle, IDHOT_SNAPWINDOW, MOD_SHIFT, Key)
else
if Shift = [ssAlt] then
RegisterHotKey(Handle, IDHOT_SNAPWINDOW, MOD_ALT, Key)
else
if Shift = [ssCtrl] then
RegisterHotKey(Handle, IDHOT_SNAPWINDOW, MOD_CONTROL, Key);
end;
end;
procedure THotKeyBtn.LoadHotKey;
var
Key: Word;
Shift: TShiftState;
begin
if not (csDesigning in ComponentState) and (FHotKey <> 0) and Assigned(Parent) then
begin
ShortCutToKey(FHotKey, Key, Shift);
if Shift = [ssShift] then
RegisterHotKey(Handle, IDHOT_SNAPWINDOW, MOD_SHIFT, Key)
else
if Shift = [ssAlt] then
RegisterHotKey(Handle, IDHOT_SNAPWINDOW, MOD_ALT, Key)
else
if Shift = [ssCtrl] then
RegisterHotKey(Handle, IDHOT_SNAPWINDOW, MOD_CONTROL, Key);
end;
end;