Autor Beitrag
Dr. Zoidberg
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 29

Win 95, Win XP Home
D3 Prof, D7 Pers
BeitragVerfasst: Di 25.05.04 12:59 
Hi,

wie kann ich ein Bild im Hintergrund im bmp-Format bzw. im JPG-Vormat im Hintergrund anzeigen? Geht das Überhaupt?

mfg DrZoidberg
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Di 25.05.04 16:20 
klar, geht. Zum beispiel so (für bmp's):
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var bild:TBitmap;
[..]
bild:=TBitmap.create;
bild.loadfromfile('c:\meinbild.bmp');
form1.Canvas.Draw(0,0,bild);

Vielleicht nicht extrem elegant, aber es geht.

_________________
We are, we were and will not be.
MartinPb
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 698



BeitragVerfasst: Di 25.05.04 16:26 
Bau das am besten in diese Prozedur ein:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.FormPaint(Sender: TObject);
begin
  Form1.Canvas.Draw(0, 0, Bild);
end;


Dann wird es automatisch nachgezeichnet.

_________________
Gruß
Martin
Ochsenfrosch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 75

Win 2000 Prof.
Delphi 7
BeitragVerfasst: Di 25.05.04 16:44 
Man kann auch bei "zusätzliches" einfach auf "Image Drücken" und so ein Bild im Hintergrund anzeigen!

Ochsenfrosch

_________________
Immer positiv denken!!!! (Windows kackt nicht ab, Windows kackt nicht ab....)
Ja-Pa
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 458

Win XP, Suse 9.3
D1, D3, D5 Std, D7 Pro, D2005 Pers, Kylix 3
BeitragVerfasst: Mi 26.05.04 14:14 
Ochsenfrosch hat folgendes geschrieben:
Man kann auch bei "zusätzliches" einfach auf "Image Drücken" und so ein Bild im Hintergrund anzeigen!


Ja, wenn man die Image-Komponente nach hinten setzt (rechtsklick auf Komponente -> Nach hinten setzen).

_________________
Der Autor dieses Textes haftet nicht für Schäden an Soft- oder Hardware
oder Vermögensschäden, die durch das Benutzen des Textes entstehen.