Solved

How do I Print on a pre formatted sheet of paper?

Posted on 2006-07-03
2
322 Views
Last Modified: 2012-06-22
Is it possible to print to an exact part of a piece of paper?

I would like to write a program to fill out several different pre-printed forms. is there an easy way to program coordinates in for where the program should print what?

I am using Visual Basic 2005.

Any help would be greatly appreciated.

Thank you!`
0
Comment
Question by:OsirisJa
2 Comments
 
LVL 9

Accepted Solution

by:
jrscherer earned 500 total points
ID: 17035214
Hi OsirisJa

Here is a very simplistic example. Before you run it make sure you have a default printer hooked up.
Create a form and place a Button and a PrintDocument on it. Run it and push Button1.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
           PrintDocument1.Print()
    End Sub

    Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
        e.Graphics.DrawString("Some Text", New Font("Arial", 10, FontStyle.Bold, GraphicsUnit.Pixel), Brushes.Black, 250, 300)
    End Sub

This will print the text "Some Text" 2.5" to the right and 3.0" down from the top left margin corner.
Jack.net

0
 

Author Comment

by:OsirisJa
ID: 17041489
Thank you very much
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

747 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now