Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Print problem

Posted on 2004-11-02
3
Medium Priority
?
242 Views
Last Modified: 2010-04-23
hi I would like to put one sentence in my printdialog that will be printed with every document.
this is my code , where and how to put it:

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
        e.Graphics.DrawString(TextBox5.Text, New Font("Arial", 15, FontStyle.Regular), Brushes.Black, 1, 60)
        e.Graphics.DrawString(TextBox6.Text, New Font("Arial", 15, FontStyle.Regular), Brushes.Black, 1, 80)


THX
0
Comment
Question by:mouse6
1 Comment
 
LVL 1

Accepted Solution

by:
newbie22 earned 620 total points
ID: 12477073
Do it like this:

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
        e.Graphics.DrawString(TextBox5.Text, New Font("Arial", 15, FontStyle.Regular), Brushes.Black, 1, 60)
        e.Graphics.DrawString(TextBox6.Text, New Font("Arial", 15, FontStyle.Regular), Brushes.Black, 1, 80)
e.Graphics.DrawString("YOUR TEXT HERE", New Font("Arial", 15, FontStyle.Regular), Brushes.Black, 1, 100)

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses
Course of the Month10 days, 20 hours left to enroll

571 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