Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7081605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:56:30+00:00 2026-05-28T06:56:30+00:00

I have run into another problem with my current project. I have a form

  • 0

I have run into another problem with my current project. I have a form that I need to print. Doing some searching online I found a few examples and implemented it into my code. It prints but prints all my text boxes and labels stacked on top of one another. How can I get this to print my textboxes and labels formatted as I have them in the form?

Here is my code:

 Private Sub PrintToolStripMenuItem1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintToolStripMenuItem1.Click

        PrintDocument1.PrinterSettings.Copies = 2
        PrintDocument1.Print()

    End Sub

 Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage

        e.Graphics.DrawString(TextBox1.Text, TextBox1.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(Label1.Text, Label1.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(Label2.Text, Label2.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(datebox.Text, datebox.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(Label3.Text, Label3.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(locationbox.Text, locationbox.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(Label4.Text, Label4.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(groupbox.Text, groupbox.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(Label5.Text, Label5.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(passbox.Text, passbox.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(Label7.Text, Label7.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(TextBox6.Text, TextBox6.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(apbox.Text, apbox.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(Label8.Text, Label8.Font, Brushes.Blue, 100, 100)
        e.Graphics.DrawString(TextBox7.Text, TextBox7.Font, Brushes.Blue, 100, 100)

    End Sub

Im still new to vb 2010 so any help is appreciated, Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:56:31+00:00Added an answer on May 28, 2026 at 6:56 am

    Just realized my mistake. I’m as blind as a bat, as it was in my face the entire time.

    Just in case anyone else ever needs to figure this out.

    e.Graphics.DrawString(TextBox1.Text, TextBox1.Font, Brushes.Blue, X-coordinate, Y-coordinate)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After getting a helpful answer here , I have run into yet another problem:
I have run into a bit of a tricky problem in some C++ code,
I have run into a problem trying to modify a form I myself have
I often run into the problem that I have one stream full of data
I have run into a common, yet difficult problem. I do not use Photoshop
I have run into an issue with WPF and Commands that are bound to
I have run into this problem before but never quite solved it. I have
I have run into a situation where I want to ensure that a compound
I have run into a bit of a problem here: I had a problem-specific
I have run into an interesting problem. I have inherited a database for daemon

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.