Jump to content

  • Log In with Google      Sign In   
  • Create Account

[VB] Printing out values onto some kind of template?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Xooch   Members   -  Reputation: 179

Like
0Likes
Like

Posted 11 July 2013 - 04:40 PM

Hey there,

 

I've recently made an application to calculate quotes for patio doors and windows given its height/size and other variables, everything is working fine and it prints out the costs/profits/VAT etc onto a rich text box on the application. Now I was wondering if it's possible to get this information onto some kind of printable format which would fit onto an A4 piece of paper (This is for a professional company).

 

My guess was to design a A4 template which would have logos and such and then enters the values onto the template to create some sort of receipt. My guess is to have something which looks like this generated (http://www.starmicronics.com/files/Image/TSP800II_Hotel_Invoice_1.jpg) just pulled it off google.

 

I was wondering if this at all possible in VB? If so how would I go about doing this?

 

Thanks


Edited by Xooch, 11 July 2013 - 04:41 PM.


Sponsor:

#2 Nik02   Crossbones+   -  Reputation: 2923

Like
0Likes
Like

Posted 12 July 2013 - 02:07 AM

Do you use Windows Forms or WPF?

 

On Forms: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx

 

Basically, you get the Graphics object from the document's "OnPrinting" event; you then draw the page contents to said Graphics object. 

 

On WPF: http://msdn.microsoft.com/en-us/library/ms742418.aspx

 

You'd use the XPSDocumentWriter to send stuff to the printer. This object accepts, among other things, a Visual (as in, for example, an user control instance) that you can treat as the page contents.


Niko Suni





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS