Autor Beitrag
ebs
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Mo 08.08.05 14:29 
Hallo miteinander,
mein Programm ist jetzt fasst (fertig) :8::
Nun noch folgendes Problem/Frage :)
Ich habe 3 Forms. Nun wollte ich (mal wieder) eine Druckfunktion einbauen. Allerdings sollte nicht jedes einzelt ausgedruckt werden, sondern alle auf einem Blatt :?
Auf zwei Forms ist nur eine Komponente.
Wie würdet ihr das angehen. Vieleicht mit einer Seitenansicht?
Danke im Vorraus :D :D
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mo 08.08.05 15:18 
Den Inhalt der Forms in einem Bitmap zusammenfügen. Danach das Bitmap drucken. :lol:

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Mo 08.08.05 15:21 
Hi,

was genau willst du drucken? Screenshots deiner Formulare?

Gruß
Klabautermann
ebs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Mo 08.08.05 15:46 
Ich habe 3 Graphen (TImage), die ich dann drucken wollte. Mein Problem ist halt nur, dass ich nicht weiß, wie man die bei drucken anpasst.
Also das erste Form sollte das ganze Blatt bedecken(habe ich schon), und die anderen beiden sollten dann auf dem ersten Form liegen :?
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Mo 08.08.05 17:13 
Hallo,

hier mal drei Tipps der Schweizer für dich. Die könnten beim lösen deines Problems hilfreich sein:



Viel Erfolg
Klabautermann
ebs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Di 09.08.05 10:40 
Hallo nochmal,
ich hab mir das jetzt mal angeguckt und nochmal überlegt, und wollte das jezt so machen:
Das Hauptform wird auf eine ganze Seite gedruckt. Das habe ich auch ohne Probleme hingekriegt. Die anderen beiden Graphen sollen sich genau eine halbe Seite teilen, also das eine links, und das andere rechts. Wie sollte ich das am besten machen :? :?:
ebs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Do 11.08.05 11:17 
Hat da wirklich keiner eine Idee :?: :(

Ich denke, dass es da zwei Möglichkeiten gibt:

1) Die Beiden Images von den Graphen, voher auf ein Bild zukriegen, oder
2)Das ganze dann beim drucken zu machen.
Ich hab da mal einen Code von TeeChart gefunden, wo das ganze nach V1 gemacht wird:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
procedure TFourChartsForm.Button1Click(Sender: TObject);
var tmpH,tmpW : Integer;
begin
 { This code creates and stores a new BITMAP file
   which contains the FOUR charts.
   It asks previously the end user for the BMP filename
   where to save the bitmap.
 }

  with SaveDialog1 do
  begin
    if Execute then
    With TBitmap.Create do
    try
      { calculate bitmap size (2x2) }
      tmpW:=Chart1.Width;
      tmpH:=Chart1.Height;
      Width := 2*tmpW;
      Height:= 2*tmpH;

      { draw chart 1 }
      Chart1.BufferedDisplay:=False;
      Chart1.Draw(Canvas,Rect(0,0,tmpW,tmpH));
      Chart1.BufferedDisplay:=True;

      { draw chart 2 }
      Chart2.BufferedDisplay:=False;
      Chart2.Draw(Canvas,Rect(0,tmpH+1,tmpW,2*tmpH));
      Chart2.BufferedDisplay:=True;

      { draw chart 3 }
      Chart3.BufferedDisplay:=False;
      Chart3.Draw(Canvas,Rect(tmpW+1,0,2*tmpW,tmpH));
      Chart3.BufferedDisplay:=True;

      { draw chart 4 }
      Chart4.BufferedDisplay:=False;
      Chart4.Draw(Canvas,Rect(tmpW+1,tmpH+1,2*tmpW,2*tmpH));
      Chart4.BufferedDisplay:=True;
      SaveToFile(FileName);
    finally
      Free;
    end;
  end;
end;

Allerdings läuft der mit 4, und ich will das mit 2 machen, außerdem weiß ich dann nicht, wie ich bei diesem Laufzeit erzeugten, ohne Name, den drucken kann.

Vieleicht hilft euch das weiter :lol: