Newbie ?

  • Thread starter Thread starter Barry
  • Start date Start date
B

Barry

Hi all
I am just trying to learn VB.Net. I have no Pryor experience in programming
so be kind.. I have a small project that has a working DataGrid and want to
print the contents of the DataGrid. I have downloaded a Print Handler from
thescarms.com and added it to my project as a class. Now how do I call up
the PrintHandler class to print the dataset. I have Print and PrintPreview
on a title bar menu.
Any Help Is Greatly Appreciated: Barry
 
Hi Barry,

I've just had a look at the scrams site, and it looks like you need to
create a PrintHandler object when the user presses the print or print
preview button. Do this by placing the following code in the click event of
your print or print preview buttons (normally the easiest way to find the
click event is to just double click on the button when you are in design
mode)

Dim objPrintHandler as new PrintHandler

You can now pass parameters to the object (objPrintHandler) such as the
report title (objPrintHandler.ReportTitle = "Your title") while you are
still in the click event.

To print, it looks like you need to call the print routine so you'd code:

objPrintHandler.Print() or objPrintHandler.PrintPreview()

Does this help?

Mitch
 
Back
Top