Search results for 'TPrintDialog'. 1 post(s) found.
This code show an example of how to Print a text of a RichEdit component.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
PrintDialog1: TPrintDialog;
RichEdit1: TRichEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
If PrintDialog1.Execute then
richedit1.Print('Ltp1'); {Ltp1 stands for Printer}
end;
end.
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
PrintDialog1: TPrintDialog;
RichEdit1: TRichEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
If PrintDialog1.Execute then
richedit1.Print('Ltp1'); {Ltp1 stands for Printer}
end;
end.
Another posts included in "Delphi"
| How Do I Remove The Application Icon From The Taskbar? (0) | 2007/08/25 |
| How to draw Transparent Text on bitmap (0) | 2007/09/01 |
| Browse for Computers, Folders, Files and Printers (0) | 2007/09/10 |
| How To Make An Animated Application Icon (0) | 2007/08/25 |
| How To Pass The Focus To The Next/prior Control (0) | 2007/08/25 |
| How To Make Rounded Windows (0) | 2007/08/25 |
| How To Get Windows Uptime (0) | 2007/08/25 |
| How To Find Out Total And Available Memory (0) | 2007/08/25 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 00:09
moneyideas
-
Subject different money making ideas
2010/01/29 08:33
moneyideas
-
Subject different money making ideas
2010/01/31 16:42
moneyideas

Prev

Rss Feed