Autor Beitrag
Daniel_100
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63

Win XP
D3 Prof, D6 Enterprise
BeitragVerfasst: So 15.06.03 13:13 
Hallo!

Ich möchte gern ein Bild in eine Form einfügen, aber während die Anwendung ausgeführt wird. Geht das?

VG

Daniel


Zuletzt bearbeitet von Daniel_100 am So 15.06.03 13:42, insgesamt 1-mal bearbeitet
hansg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 168

Win XP Professional SP3, Vista Ultimate 32 SP1
Delphi 6 Professional
BeitragVerfasst: So 15.06.03 13:26 
ausblenden Delphi-Quelltext
1:
  Image1.Picture.LoadFromFile('c:\test.jpg');					

_________________
Gruß Hans
Daniel_100 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63

Win XP
D3 Prof, D6 Enterprise
BeitragVerfasst: So 15.06.03 13:40 
Ich meine das so:

Du klickst auf einen Werkzeug-Button, dann erscheint ein Bild am Cursor, das diesem folgt und wenn du auf irgendeine Stelle der Form klickst, wird das Bild dort "abgesetzt". Dies soll man beliebig oft machen können.

Daniel
G-McKree
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 178



BeitragVerfasst: Di 17.06.03 21:41 
mit dem mausfolgen is glaub ich ein haufen quelltext verbunden

aber für die vielen bilder mach doch einfach nen dynamischen array

und die mausposition (relativ zur form) bekommst du so raus:
ausblenden Delphi-Quelltext
1:
2:
image1.left:= mouse.CursorPos.X - form1.left;
image1.top:= mouse.CursorPos.Y - form1.top;
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Di 17.06.03 23:19 
Daniel_100 hat folgendes geschrieben:
Ich meine das so:

Du klickst auf einen Werkzeug-Button, dann erscheint ein Bild am Cursor, das diesem folgt und wenn du auf irgendeine Stelle der Form klickst, wird das Bild dort "abgesetzt". Dies soll man beliebig oft machen können.

Daniel


Nix für ungut, aber ich hätte gerne, daß wenn ich auf ein Button klicke, er mir alle unnötigen Daten auf der Festplatte löscht. Hmmm? Ich glaube sowas nennt man Programmieren.

Deine Frage fällt nicht mehr unter die Rubrik "Wie-Geht-Das", sonder ist bereits eine Aufgabenstellung.

_________________
Popov
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mi 18.06.03 07:38 
Mal ein Tipp: Du musst das TImage dynamisch erzeugen und dann in einer Liste (dynamisches Array oder z. B. TList) hinzufügen. Das TImage dynmisch zu erzeugen geht wie folgt:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
Var
  NewImage: TImage;

{...}

  NewImage := TImage.Create (Self);  // Self oder ein anderer Owner
  NewImage.Parent := Self            // Self oder ein anderer Parent

Gruß
Tino