[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Delphi 5 - How to Send a FORM FEED Command

Posted on 2006-03-21
6
Medium Priority
?
404 Views
Last Modified: 2010-04-05
I am using Delphi 5 (still) and just finishing off an application.
It would be REALLY useful if I could click on a button to send a Form Feed to the default printer.

Can someone tell me what the correct lines to insert are?
The rest of the reports are, suprisingly, generated by QReports :-).

With thanks,

Ed
0
Comment
Question by:edhasted
  • 3
  • 2
6 Comments
 
LVL 9

Expert Comment

by:bernani
ID: 16252515
0
 
LVL 9

Expert Comment

by:bernani
ID: 16252545
0
 

Author Comment

by:edhasted
ID: 16252692
With the formfeed.dpr function I was uncertain how to imbed it into my program and then call it - exuse my naievity.

With the Torry example what happens if it's not LPT1? Is it possible to get it to send to the defualt printer?

Ed
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Accepted Solution

by:
quilley earned 200 total points
ID: 16279652
uses Printers;

procedure TForm1.btnFormFeedClick(Sender: TObject);
begin
  Printer.BeginDoc;
  Printer.EndDoc;
end;

Quick & dirty, but it works!
0
 

Author Comment

by:edhasted
ID: 16293578
Where does Printer. come from?

Delphi generates unidentfied Identifer when I try this.

There doesn't appear to be a Printer. drop in or am I missing something fundametnal.

Yours,

Ed
0
 

Author Comment

by:edhasted
ID: 16294319
Sorted, put the Printers unit and and prefixed the syntax so it reads:

begin
  Printers.Printer.BeginDoc;
  Printers.Printer.EndDoc;
end;

This is universally simple - sends to the defaul printer and wonderfully short.

This is the quickest and most efficient of the solution provided.

With many thanks,

Ed Hasted
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question