Printing VB.NET Form

Trying to print a large form using VB.NET

Page 1 of 1

3 Replies - 9249 Views - Last Post: 03 November 2009 - 05:26 AM Rate Topic: -----

#1 itgeektech  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-June 09

Printing VB.NET Form

Post icon  Posted 08 June 2009 - 02:07 PM

:ph34r: There is no code for me to post since I have tried several variations and have not come across what I need. I have used everything from copy from screen methods to trying to make a bitmap and sticking it in a word document (which is just a glorified copy from screen method). The form I am trying to print is much longer than most, and wider too. The methods out there do not give an adequate answer to the dilemma. Unless you really know the answer do not reply to this thinking that you do. Printing a form is in essence printing an image of whatever size. There are some products that will print an image regardless of the size, after they have scaled it down to fit on an 8.5 x 11 piece of paper, but I want to be able to do it in vb.net. I am using visual basic 2008 in microsoft visual studio 2008, and I even have the service pack 1 that has the print form method that does not work for the form with my size, another glorified copy from screen method. I have even tried the gdi graphics and it still comes up short. So if you have examples of code that will do this please reply.

Is This A Good Question/Topic? 0
  • +

Replies To: Printing VB.NET Form

#2 Bort  Icon User is offline

  • Ill-informed Mongoloid
  • member icon

Reputation: 445
  • View blog
  • Posts: 3,084
  • Joined: 18-September 06

Re: Printing VB.NET Form

Posted 09 June 2009 - 06:55 AM

Personally I've always used the PrintForm method from the PowerPacks. What are the problems you are having when you try using this?

If it is because the form is too big, an alternative is to completely resize the form before you use the PrintForm method - work out the form size and what size it needs to be. Get the new size as a percentage of the old size, then use a With... statement to loop through every control on the form making it the right size and place to fit onto a newly sized form for printing.

Quote

Unless you really know the answer do not reply to this thinking that you do.


How will people know if they have the right answer if you are not willing to try what they suggest? I don't know that I have the right answer, but surely suggestions like this are better than no responses at all?

This post has been edited by Bort: 09 June 2009 - 07:00 AM

Was This Post Helpful? 0
  • +
  • -

#3 alan_2k9  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 27-October 09

Re: Printing VB.NET Form

Posted 02 November 2009 - 06:13 PM

we have the same problem. If you notice it printform with the scrollable option will only print the the maximum size of your screen resolution. meaning if your paper size is bigger than you screen resolution then not all content of your form will be printed. posted this problem also but nobody answers it.
Was This Post Helpful? 0
  • +
  • -

#4 motcom  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 290
  • View blog
  • Posts: 1,371
  • Joined: 16-June 08

Re: Printing VB.NET Form

Posted 03 November 2009 - 05:26 AM

They should call the PrintForm not PrintForm but PrintScreenToPrinter

(VB Power Packs
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1