Board index » delphi » TCustomForm.Print Problem???

TCustomForm.Print Problem???

Dear Programmers.

I have this program that print current form to printer.  However, it works
all but on computers.  Where or what should I look at to solve this problem.

Program is written in Delphi 4 Enterprise Version.  Compiled on NT
workstation, running on Windows98.

Earl Park
earlp...@home.com

 

Re:TCustomForm.Print Problem???


Quote
"Earl Park" <earlp...@home.com> wrote in message

news:84tvmr$hvr6@bornews.borland.com...

Quote
> I have this program that print current form to printer.  However, it works
> all but on computers.  Where or what should I look at to solve this

problem.

So what code are you using?
Are you using StretchDIBits instead of StretchDraw?

--
efg

Earl F. Glynn     E-Mail:  EarlGl...@att.net
Overland Park, KS  USA

efg's Computer Lab:  http://www.efg2.com/Lab

Re:TCustomForm.Print Problem???


I am using Print method of TForm.

procedure TForm.Button1Click(Sender: Object);
begin
    Print;
end;

That's it.

Earl Park

Earl F. Glynn <EarlGl...@att.net> wrote in message
news:84tvpv$hvr8@bornews.borland.com...

Quote
> "Earl Park" <earlp...@home.com> wrote in message
> news:84tvmr$hvr6@bornews.borland.com...

> > I have this program that print current form to printer.  However, it
works
> > all but on computers.  Where or what should I look at to solve this
> problem.

> So what code are you using?
> Are you using StretchDIBits instead of StretchDraw?

> --
> efg

> Earl F. Glynn     E-Mail:  EarlGl...@att.net
> Overland Park, KS  USA

> efg's Computer Lab:  http://www.efg2.com/Lab

Re:TCustomForm.Print Problem???


Earl:

Quote
"Earl Park" <earlp...@home.com> wrote in message

news:84u5e4$hvu23@bornews.borland.com...

Quote
> I am using Print method of TForm.

> procedure TForm.Button1Click(Sender: Object);
> begin
>     Print;
> end;

I checked the source code on TCustomForm.Print (in D3-D5) and
it appears to do use StretchDIBits, which is the correct way to
print a bitmap.  But your example does fail on my LaserJet 5, just
like you describe.  I'm not sure why.

Joe Hecht's "A Better Way to Print a From" works fine on the same printer:
http://www.borland.com/devsupport/delphi/ti/TI1412D.html

--
efg

Earl F. Glynn     E-Mail:  EarlGl...@att.net
Overland Park, KS  USA

efg's Computer Lab:  http://www.efg2.com/Lab

Re:TCustomForm.Print Problem???


Borland Delphi Form printing got you down?
Try my TExcellentFormPrinter!

http://home1.gte.net/joehecht/index.htm

Joe

Quote
Earl Park wrote:

> Dear Programmers.

> I have this program that print current form to printer.  However, it works
> all but on computers.  Where or what should I look at to solve this problem.

> Program is written in Delphi 4 Enterprise Version.  Compiled on NT
> workstation, running on Windows98.

> Earl Park
> earlp...@home.com

--
Joe C. Hecht
http://home1.gte.net/joehecht/index.htm

Re:TCustomForm.Print Problem???


Thanks Earl! I also have a unit that prints even
more reliably, and provides support for printing
an entire form (even those portions that are
scrolled out of view).

Take a look at  TExcellentFormPrinter!

at:

http://home1.gte.net/joehecht/index.htm

Joe

Quote
Earl F. Glynn wrote:

> Earl:

> "Earl Park" <earlp...@home.com> wrote in message
> news:84u5e4$hvu23@bornews.borland.com...
> > I am using Print method of TForm.

> > procedure TForm.Button1Click(Sender: Object);
> > begin
> >     Print;
> > end;

> I checked the source code on TCustomForm.Print (in D3-D5) and
> it appears to do use StretchDIBits, which is the correct way to
> print a bitmap.  But your example does fail on my LaserJet 5, just
> like you describe.  I'm not sure why.

> Joe Hecht's "A Better Way to Print a From" works fine on the same printer:
> http://www.borland.com/devsupport/delphi/ti/TI1412D.html

> --
> efg

> Earl F. Glynn     E-Mail:  EarlGl...@att.net
> Overland Park, KS  USA

> efg's Computer Lab:  http://www.efg2.com/Lab

--
Borland Delphi and BCB TForm printing got you down? Try my
TExcellentFormPrinter!
Joe C. Hecht
http://home1.gte.net/joehecht/index.htm

Re:TCustomForm.Print Problem???


Quote
Joe C. Hecht wrote in message <3873E384.1...@gte.net>...
>Borland Delphi Form printing got you down?
>Try my TExcellentFormPrinter!

>http://home1.gte.net/joehecht/index.htm

>Joe

Hi Joe

When are we going to see your print preview/recordable canvas stuff :) That
I would buy!!

Regards

Vincent Parrett

VSoft Technologies Pty Ltd.

Web  : http://www.vsoft-tech.com.au
Email : vincent AT vsoft-tech.com.au

Other Threads