#1
|
|||
|
|||
delphide mause olayları
mausenin sağ tuşuna basılıp sürüklenince çizgi orta tuşuyla kare sol tuşuyla daire çizen program kodları
Form1: TForm1; x1,x2,y1,y2:integer; implementation {$R *.dfm} procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin x1:=x; y1:=y; end; procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin x2:=x; y2:=y; if shift=[ssalt] then begin form1.canvas.Pen.Width:=20; end; if shift=[ssshift] then begin form1.Canvas.Pen.Color:=clblue; end; if shift=[ssctrl] then begin form1.Color:=clred; form1.canvas.pen.color:=clgreen; end; if (button=mbleft) then begin form1.Canvas.MoveTo(x1,y1); form1.Canvas.lineTo(x2,y2); form1.canvas.pen.color:=clwhite; end; if (button=mbright) then begin form1.Canvas.ellipse(x1,y1,x2,y2); form1.canvas.pen.color:=clwhite; end; if (button=mbmiddle) then begin form1.Canvas.rectangle(x1,y1,x2,y2); form1.canvas.pen.color:=clwhite; end; end; procedure TForm1.FormCreate(Sender: TObject); begin form1.color:=clblack; end; end. |
Benzer Konular |
||||
Konu | Konuyu Başlatan | Forum | Cevaplar | Son Mesaj |
Galeta | Yorgun Yürek | efgğhıij | 0 | 25 March 2009 17:05 |
Chelsea fırsatı tepti! | ALfoNsO | Avrupadan Futbol, | 0 | 22 December 2008 22:15 |