Вниз
Скачать: CL | DM;

VCL: (ssCtrl in shift); KOL: ?   Найти похожие ветки 

← →
Revolter   (2003-09-17 15:05) [0]

в VCL обработчик события нажатие клавиши Ctrl: (ssCtrl in shift), а как в KOL?


← →
Gandalf ©   (2003-09-20 10:31) [1]

Можно так:

procedure TForm1.ListBox1KeyDown(Sender: PControl; var Key: Integer;
 Shift: Cardinal);
begin
 if (Shift and 4)=4 then
 begin
   ListBox1.Items[0]:="Shift +";
 end
 else
 begin
   ListBox1.Items[0]:="Shift -";
 end;

 if (Shift and 8)=8 then
 begin
   ListBox1.Items[1]:="Ctrl +";
 end
 else
 begin
   ListBox1.Items[1]:="Ctrl -";
 end;

 if (Shift and 32)=32 then
 begin
   ListBox1.Items[2]:="Alt +";
 end
 else
 begin
   ListBox1.Items[2]:="Alt -";
 end;

end;


← →
Revolter   (2003-09-20 18:46) [2]

как сложно, однако..

спасибо


← →
Gandalf ©   (2003-09-20 20:14) [3]

На самом деле можешь скажем сделать так:

TShiftStates=(ssRes1,ssRes2,ssShift,ssCtrl,ssRes3,ssAlt);
TShiftState=set of TShiftStates;

Ну и привидя тип TShiftState(Shift) можешь работать как с множеством.

(ssCtrl in TShiftState(shift))



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.023 c
3-1080151731
Doctor Deejay
2004-03-24 21:08
2004.04.25
Фильтрация


14-1080728471
syte_ser78
2004-03-31 14:21
2004.04.25
Вопрос к Харьковчанам (если тут такие есть)


11-1064690246
Dimaxx
2003-09-27 23:17
2004.04.25
Про ActiveX


3-1080460711
Dimagenius
2004-03-28 11:58
2004.04.25
Как осуществить поиск в таблице базы данных?


1-1081248193
Piero
2004-04-06 14:43
2004.04.25
Как просмотреть дерево каталогов на диске




   Наверх