Windows Develop Bookmark and Share   
 index > Windows Forms General > Create a 'form' that is interactive on the screen and printable...
 

Create a 'form' that is interactive on the screen and printable...

The original of the Form is a paper form, such as a tax form, loan application form, etc. This Form needs to be displayed on the screen for data entry and appear similar to the original. When the user goes to print out this Form, the print out should look virtually identical to the form on the screen.

If the interactive aspect of this was removed, it could all be done easily enough by implementing a function that is called by both the printing code and the OnPaint() method of a System.Windows.Forms.Control.

How is this implemented with the interactive data entry form? I am assuming there is some solution this dilemma, but I am drawing a blank.

EHCarleton  Friday, September 25, 2009 11:53 AM
This is typically solved with Adobe Acrobat. It can make .pdfs that are editable, printing is of course not a problem. You can do it too in Windows Forms, it just a bunch of work to make the form resemble the paper original. They'll endlessly pester you with requests to make the printed form look different or to make it match the original if they change the paper one. If you have to, I suppose you can start with a scanned image of the form and a config file that lists the locations and sizes of fields in the form that need filled out. Put a text box there.

Hans Passant.
nobugz  Friday, September 25, 2009 12:33 PM
This is typically solved with Adobe Acrobat. It can make .pdfs that are editable, printing is of course not a problem. You can do it too in Windows Forms, it just a bunch of work to make the form resemble the paper original. They'll endlessly pester you with requests to make the printed form look different or to make it match the original if they change the paper one. If you have to, I suppose you can start with a scanned image of the form and a config file that lists the locations and sizes of fields in the form that need filled out. Put a text box there.

Hans Passant.
nobugz  Friday, September 25, 2009 12:33 PM
Hi EHCarleton,

Based on my understanding, you want to edit some fields in the document and print it. My suggestion is to use WebBrowser control. You can code your document as an html page; put the fields for editing with html tag such as textarea. Therefore you can print the web page easily.

Here is the information of WebBrowser printing.
http://msdn.microsoft.com/en-us/library/b0wes9a3.aspx

If you have any doubt, please feel free to tell me.

Sincerely,
Kira Qian
Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!
Kira Qian  Monday, September 28, 2009 9:52 AM

You can use google to search for other answers

Custom Search

More Threads

• doevents c# threading sample
• GIF Animation does not start immediately
• NumericUpDown Hidden Feature
• How can I make a big windows form?
• Check emails and download attachments from vb.net
• Storing NameValueCollections in Application Settings?
• How can I make my application form to the top of the screen?
• Updating Windows Forms from a Thread
• from Textbox to a database?
• richtext box scroller position