[ BIG FOOT @ 13.02.2004. 06:13 ] @
Kako to da isprogramiram?Delphi 7
[ erekoz @ 13.02.2004. 09:23 ] @

Pa, generalno, treba da za kompnentu koja te interesuje obradis OnMouseDown Event. U njemu napises :

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin

if Shift = [ssRight] then
begin

showmessage('Ciao!');

end;


end;

Pozdrav , erekoz
[ goblin @ 13.02.2004. 15:28 ] @
Moram da dodam da je daleko sigurnije umesto
Code:
if Shift = [ssRight] then

napisati
Code:
if ssRight in Shift

za slucaj da ovaj set sadrzi jos neku informaciju (npr ako je korisnik koristio i Shift taster). Ipak, najsigurnije je:
Code:
if Button = mbRight

jer tako nema sumnje a i "cistija" je sintaksa
[ erekoz @ 15.02.2004. 21:41 ] @

Vaisitinu bezbednije...