Autor Beitrag
novabeat
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 20



BeitragVerfasst: Sa 01.11.03 12:35 
Hi !!

ich hab mal ne frage zu den code hier:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
  var BMP:Tbitmap;
      Jpg : TJpegImage;
      stream:Tstream;
begin
     try
       BMP := TBitmap.Create ;
       jpg := TJpegImage.Create;
       stream := TStream.Create ;
       Screencapture (bmp);
       bmp.SaveToStream (stream);
       ...


und ich bekomm immer bei der letzten zeile bmp.savetostream einen "abstrakten fehler". wieso. ich will doch nur das bild in den stream speichern um dann später was mit dem zu machen ?
was ist da falsch ??
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Sa 01.11.03 12:44 
Hallo

Zitat:

stream := TStream.Create ;


onlinehilfe hat folgendes geschrieben:

Als abstrakte Klasse kann TStream nicht instantiiert werden

du kannst keinen Tstream erzeugen, sondern nur eine abgeleitete Klasse (z.B. TFilestream)

Mfg Frank[/quote]

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 01.11.03 15:35 
nimm mal TmemoryStream her !

_________________
In the beginning was the word.
And the word was content-type: text/plain.