Tracks entere MouseDown et MouseUp ????

MiniProgramer Messages postés 37 Date d'inscription samedi 5 juillet 2008 Statut Membre Dernière intervention 24 juillet 2008 - 21 juil. 2008 à 13:10
offlake Messages postés 190 Date d'inscription mercredi 3 septembre 2008 Statut Membre Dernière intervention 17 janvier 2009 - 8 janv. 2009 à 08:49
Salut

je voudrais faire tracks (Trace) entre MouseDown et MouseUP
exemple : ( la ligne doit après effacée et je ne veut pas dessiner une Ligne)

j ai essayée comme ça :
mais il sa  marche pas correctement :

var
Form1: TForm1;
x1, y1 : 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);
var
j : Integer;
begin
j : = 10;
while x1 < x dobegin
self.Canvas.MoveTo(x1, y1);
Inc(x1,j);
 
self.Canvas.LineTo(x1, y1);
Inc(x1,j);
end;
end;

alors je doit aussi programmer une chose en MouseMove pour afficher la Trace ou bien ?

1 réponse

offlake Messages postés 190 Date d'inscription mercredi 3 septembre 2008 Statut Membre Dernière intervention 17 janvier 2009
8 janv. 2009 à 08:49
Bonjour !
Oui exactement !!
Tu doit faire comme ça on utilisant   un Shape.PEN.STYLE:=psDot;
ça doit marcher on réfléchissant sur la maniére comment tu doit l'appliquer !!
pour plus d'information:  sami_inf@hotmail.fr
BY OFFLAKE
0
Rejoignez-nous