Autor Beitrag
AlexBegin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Sa 09.05.09 09:49 
Ich möchte den kompletten Inhalt (TImage, Memos) in eine Grafik-Datei (.bmp) speichern. Habe hier im Forum schon gesucht, aber nur für TImage was gefunden. Kann mir jemand weiterhelfen?

Bis dann Alex
ffgorcky
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 573

WIN XP/2000 & 7Prof (Familie:Win95,Win98)

BeitragVerfasst: Sa 09.05.09 10:01 
Wie genau möchtest Du das machen?
Möchtest Du einen Abbild des aktuellen Fensters als Bilddatei speichern? - Also sozusagen, als ob Du die Taste Alt hälst und dazu die Taste Druck Drückst?
Dafür gäbe es dieses:
ausblenden Delphi-Quelltext
1:
ScreenshotActiveWindow(var BildablageVariable:TImage);					

Oder auch genauer hier
Und dann natürlich BildablageVariable.SaveToFile('BeliebigerDateiName'), wie man es dort ja auch sieht.


Zuletzt bearbeitet von ffgorcky am Sa 09.05.09 10:11, insgesamt 7-mal bearbeitet
Webo
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 577
Erhaltene Danke: 14

Win 7, Debian
C# (Visual Studio 2013), PHP, C, C++ (Eclipse, KDevelop)
BeitragVerfasst: Sa 09.05.09 10:01 
Ich gehe mal davon aus, dass du von deiner eigenen Form einen Screenshot machen möchtest ...

Dan hilft dir dieser Link weiter.



Grüße

Webo

_________________
Man kann nur das aus dem Ärmel schütteln, was man auch vorher reingesteckt hat.
AlexBegin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Sa 09.05.09 10:15 
Erst einmal Danke für die schnelle Antwort. Ich wollte ein Abbild meines Forms haben, aber ohne Rand. Ich muss mir heute Abend das Ganze anschauen. Wenn ich noch Fragen habe werde ich mich dann melden.

Bis dann Alex
ssb-blume
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 375
Erhaltene Danke: 7

XP, W7, W8
Deutschland
BeitragVerfasst: Sa 09.05.09 10:23 
Es gibt auch ein schönes Programm mit allen möglichen Features: Hardcopy.
Siehe hier: www.sw4you.de oder www.hardcopy.de

_________________
Brain: an apparatus with which we think we think.
AlexBegin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Sa 09.05.09 10:37 
Ich habe noch eine andere Möglichkeit gefunden, nehmlich mit dem Befehl :

Form1.GetFormImage.SaveToFile('c:\bild.bmp')
Webo
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 577
Erhaltene Danke: 14

Win 7, Debian
C# (Visual Studio 2013), PHP, C, C++ (Eclipse, KDevelop)
BeitragVerfasst: Sa 09.05.09 10:37 
Hier hab ich eben noch ein kleinen Codeschnippsel, den ich mal in einem Tool von mir verwendet habe:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
var
 Bitmap: TBitmap;
begin
 Bitmap:=GetFormImage;
 try
   Bitmap.SaveToFile(yourfilename);
 finally
   Bitmap.Free;
 end;


Dann wird, mit Ausnahme des TWebBrowser - Inhalt, die Form gespeichert, ohne den Rand oben und an den Seiten.

_________________
Man kann nur das aus dem Ärmel schütteln, was man auch vorher reingesteckt hat.