Google Answers Logo
View Question
 
Q: How to print any control with vb.net ( No Answer,   3 Comments )
Question  
Subject: How to print any control with vb.net
Category: Computers > Programming
Asked by: brother_bill-ga
List Price: $30.00
Posted: 05 Nov 2004 05:56 PST
Expires: 05 Dec 2004 05:56 PST
Question ID: 424808
Need sample to print any .net control using vb.net.
For example, a Button is easily displayed on screen, but don't see how
to print it on a screen.
I wish to be able to print a Rich Text Box on the paper.
Answer  
There is no answer at this time.

Comments  
Subject: Re: How to print any control with vb.net
From: somisetti-ga on 19 Nov 2004 02:09 PST
 
hey can you make your question more clear i did not get what you are looking for?
Subject: Re: How to print any control with vb.net
From: brother_bill-ga on 19 Nov 2004 05:46 PST
 
In vb.net, it is trivial to add a "control", like Button or
RichTextBox to the screen.  But printing it is not trivial.  There is
a third party tool called PrintForms for .net, located at
http://www.winformreports.co.uk/features_pf.htm

The goal is to print controls on paper, which the folks at Microsoft
seem to have omitted.

Does this answer your question?
Subject: Re: How to print any control with vb.net
From: rikkus-ga on 22 Nov 2004 08:38 PST
 
To print a RichTextBox control, as requested:

http://support.microsoft.com/default.aspx/kb/811401/EN-US/

If really do need to print _any_ control, you may find this a great
deal more difficult. It is not possible, at least with the .NET API
1.1, to redirect a Graphics object. Nor is it possible to somehow hook
into the Paint event of every control in a hierarchy and have it draw
to a different Graphics object.

I suspect part of the reason for this is that Microsoft did not
implement all of the Windows controls for .NET. They simply call the
existing native code versions from managed code. If all controls were
implemented with managed code, I suspect it will become a great deal
easier to print controls.

Good luck!

Rik

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy