Send raw data to a printer with VB .NET 2005

P

pete

I am rewriting a program that I created in VB6 that sends the raw data
directly to the printer as show here
http://support.microsoft.com/kb/q154078/. Does anyone have a working example
of sending raw data to a printer with VB.NET 2005? I've tried this example
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/vb05legacyhardware.asp
and got an error when trying to run it. "Error 1 Handles clause requires a
WithEvents variable defined in the containing type or one of its base
types."

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles
PrintDocument1.PrintPage

The example listed here http://support.microsoft.com/kb/322090/en-us is for
VB 2003 not VB 2005.

Thanks for your help,
Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top