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

  • Home
  • SEARCH
  • 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 8242247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:06:07+00:00 2026-06-07T21:06:07+00:00

I have a Winform application that creates signs. Everything works and looks fine except

  • 0

I have a Winform application that creates signs. Everything works and looks fine except when I print. I have an image with textboxes placed on top of them. They are visible on my computer, but not when I print. I am assuming that somehow when I print the image is getting “Brought-to-front.”

Below is my Print Function:

private void btnPrint_Click(object sender, EventArgs e)
    {
        PrintDocument pd = new PrintDocument();
        pd.PrintPage += new PrintPageEventHandler(PrintImage);
        pd.Print();      
    }

    void PrintImage(object o, PrintPageEventArgs e)
    {
        int x = SystemInformation.WorkingArea.X;
        int y = SystemInformation.WorkingArea.Y;
        int width = this.Width;
        int height = this.Height; 

        Rectangle bounds = new Rectangle(x, y, width, height); 

        Bitmap img = new Bitmap(width, height); 

        this.DrawToBitmap(img, bounds);
        Point p = new Point(100, 100);
        e.Graphics.DrawImage(img, p);    
    }

I don’t know for sure that anything in the print function is a cause, but I can’t think of anything else.

  • 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-06-07T21:06:10+00:00Added an answer on June 7, 2026 at 9:06 pm

    I don’t know the answer to the question of why the TextBox contents are not being rendered, but I can tell you that you are doing it “wrong”.

    What you should be doing is rendering the text in your paint handler and using a single, “in-place” TextBox for allowing the user to edit text at some location on the form which is moved into position and made visible just-in-time for editing.

    It requires that your “document” consist of lists of objects (like “text blocks”) which you can render and which you can detect the bounds of for when the user tries to manipulate them. This is very similar to how a “paint” program works.

    This is going to be a complete departure from what you are doing now. It’s always a lot more work to do things “correctly”. I don’t want to tell you to redo your application. If this is a learning experience and not a commercial product, it’s OK to hack your way through it, using what you’re familiar with. But maybe next time you might try another approach.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a c# winform application that uses SQL 2005 Express. The application creates
I have a winform application that contains a c# webbrowser control.Webbrower control load a
I have an c# winform application that runs under a local account but needs
We have an in house winform application that is used by about 20 users
I have an application (winform exe) that I run several times. Does this mean
I have several controls in a winform application that I added databindings to using
I have two ComboBoxes in a WinForm application that display COM ports detected on
Background: I have a winform application written in VB.NET that uses a WebService to
I have a winform application that uses some referenced web services to get data.
Hi, I have a winform application that is hosting a WCF Service(NamedPipes). When reciving

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.