Print document

moongodess

Active member
Joined
Dec 23, 2004
Messages
40
Hi!

Its the first time im using vb .net to an application.
I need to know how can I print an htm page because everything I tried failed.
Im shore Im doing something rong :( but I dont know what it is.
You can see my code in the attachment.
It happens that when I see the print dialog and pess ok the page have nothing written on it.
Ive alredy checked if the document really exists (because it is created before), etc, etc, but I never worked with this components so.. :o I really dont know what is wrong.

If someone can help me with some idea it but be great ;)
 

Attachments

All that DocumentName property does is set a name to be displayed. It doesnt allow you to easily print an html document. As far as I know, there actually isnt a .NET way of easily printing an html document.
 
:( Thanks for your post.. I really dont know what to say..
I thought it was something simple, and I have to solve it very fast..
Id appreciate if someone came up with any idea..
 
Now I tried this:

Dim sdgProcess As New System.Diagnostics.ProcessStartInfo
sdgProcess.Verb = "Print"
sdgProcess.CreateNoWindow = False
sdgProcess.WindowStyle = ProcessWindowStyle.Normal
sdgProcess.FileName = mstrDocument
sdgProcess.UseShellExecute = True
System.Diagnostics.Process.Start(sdgProcess)
Application.DoEvents()
sdgProcess = Nothing
But it doesnt print the page correctly..
I need it to print with the font type, colors,.... that I see when I open the html document in a browser..
 
Back
Top