Autor Beitrag
Soapy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 88

Windows 2000
Delphi 2005 Personal
BeitragVerfasst: Mi 23.01.08 22:41 
Ich habe es jetzt so gelöst:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
procedure TForm1.Image3Click(Sender: TObject);
var CursorPosX, CursorPosY:integer;
begin
Cursorposx := ScreenToClient(Mouse.CursorPos).X;
cursorposy := ScreenToClient(Mouse.CursorPos).Y;
Setlength(FImages, length(FImages)+1);
  FImages[length(FImages)-1]:= TImage.Create(self);
  FImages[length(FImages)-1].Name:= 'Kaserne'+InttoStr(length(FImages));
  FImages[length(FImages)-1].Parent:= Scrollbox3;
  FImages[length(FImages)-1].height:= 20;
  FImages[length(FImages)-1].width:= 50;
  FImages[length(FImages)-1].Left:= CursorPosX;
  FImages[length(FImages)-1].Top:= CursorPosY;
  FImages[length(FImages)-1].Picture.LoadfromFile('C:\Dokumente und Einstellungen\Philipp\Eigene Dateien\staemme.jpg');
  Image3.Visible := false;
end;


Nur wenn ich jetzt auf das Image3 klicke, wird es deaktiviert?!?!?! Ach Gott... Wie ich es hasse!

_________________
Linux wird nie das meistinstallierte Betriebssystem sein, wenn man bedenkt, wie oft man Windows neu installieren muss!
Soapy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 88

Windows 2000
Delphi 2005 Personal
BeitragVerfasst: Mi 23.01.08 22:51 
Juhu ich habs!
Vielen Dank für eure Antworten und Lösungsversuche!

Meine Lösung:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
procedure TForm1.Image3Click(Sender: TObject);
var CursorPosX, CursorPosY:integer;
begin
Cursorposx := ScreenToClient(Mouse.CursorPos).X;
cursorposy := ScreenToClient(Mouse.CursorPos).Y;
Setlength(FImages, length(FImages)+1);
  FImages[length(FImages)-1]:= TImage.Create(self);
  FImages[length(FImages)-1].Name:= 'Kaserne'+InttoStr(length(FImages));
  FImages[length(FImages)-1].Parent:= Scrollbox3;
  FImages[length(FImages)-1].height:= 20;
  FImages[length(FImages)-1].width:= 50;
  FImages[length(FImages)-1].Left:= CursorPosX;
  FImages[length(FImages)-1].Top:= CursorPosY;
  FImages[length(FImages)-1].Picture.LoadfromFile('C:\Dokumente und Einstellungen\Philipp\Eigene Dateien\staemme.jpg');
  Image3.Enabled := false;
  Image3.Visible := true;
end;

_________________
Linux wird nie das meistinstallierte Betriebssystem sein, wenn man bedenkt, wie oft man Windows neu installieren muss!