Autor Beitrag
zero_cool1986
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95

MS DOS ;)
D6
BeitragVerfasst: Di 23.08.05 16:20 
hi also ich hab mal ne frage ich möchte durch einen klick auf die form das das image an diese position springt wie kann ich das realisieren? also mit onemousedown glaub ich aber wie? meine idee wäre
ausblenden Delphi-Quelltext
1:
2:
3:
procedure onemousedown..... 
Image1.top:=ja wo halt mit der maus geklickt wurde
image1,left:= "";
danke schon im vorraus

Moderiert von user profile iconTino: Code- durch Delphi-Tags ersetzt.
Moderiert von user profile iconGausi: Topic aus Windows API verschoben am Fr 26.08.2005 um 08:44
blaueled
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 133

Win XP
D5
BeitragVerfasst: Di 23.08.05 16:34 
Hi

user profile iconzero_cool1986 hat folgendes geschrieben:

ausblenden Delphi-Quelltext
1:
2:
3:
procedure onemousedown..... 
Image1.top:=ja wo halt mit der maus geklickt wurde
image1,left:= "";


fast:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
if Button = mbleft then
image1.left := x;
image1.top := y;
end;


Das image ist bei einem Linksklick auf der form! mit dem linken oberen rand dort, wo
der Mauszeiger ist.
Guck dir mal die variablen der Funkton an, die sagen eigentlich auch schon alles.

Arne

Moderiert von user profile iconTino: Code- durch Delphi-Tags ersetzt.
zero_cool1986 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95

MS DOS ;)
D6
BeitragVerfasst: Di 23.08.05 17:14 
ich will ja keinen button drücken
zero_cool1986 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95

MS DOS ;)
D6
BeitragVerfasst: Di 23.08.05 17:16 
nee ok funzt.. danke :lol:
zero_cool1986 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95

MS DOS ;)
D6
BeitragVerfasst: Di 23.08.05 17:32 
so nun möchte ich das zeitverzögert machen sprich in nem timer gradeaus und rechts wäre kein problem zB Image1.top:=Image1.top+1; und das alle sekunde aber nun hab ich ja die koordinaten also wenn ich irgendwo klicke soll das bild langsam an diese stelle laufen
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Mi 24.08.05 15:11 
Sehe zwar keine Frage, aber neue Fragen (auch wenn ich keine sehe :wink: ) gehören in ein neuen Thread.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)