-1

My code is

      Dim p As New Printer
      p.Print("Hello")
      p.EndDoc()

I have used

Dim k As New System.Drawing.Printing.PreviewPrintController

But its giving me compile time error in VB.Net / VB6.

I cannot use PrintDocument and I want to hide that dialog box. Any Help?

graham.reeds
  • 16,230
  • 17
  • 74
  • 137
Jack
  • 1
  • 1

1 Answers1

0

Microsoft made a library that helped the transition some from old VB6 code. This may be of some help if you are unable make major changes. Though the version I found with a brief search is pretty dated so can not say how supported it is.

Microsoft Visual Basic Power Packs 3.0 (Download Link)

Among the things it contains is the printer control that you old program may be using. (MSDN Reference)

I believe that the libraries where only suppose to be uses in a temporary transitional stage. As a project was intended to be migrated over to using the newer .NET versions of the controls.

Ryan Roos
  • 558
  • 12
  • 18