Cor,
Thanks for the reply. I would love to use the WebBrowser control.
However, i am running into a major snag. I am trying to show a
PrintPreviewDia log with rendered HTML, but I don't want to launch the
form that shows that Web Browser control.
The way I have my code right now, is as follows:
Public Sub PrintPreview(By Val strHTMLItems As String)
Try
WBControl = New WebBrowser
AddHandler WBControl.Docum entCompleted, AddressOf
WBControl_Previ ewDocumentCompl eted
WBControl.Docum entText = (strHTMLItems)
WBControl.Heigh t = 800
WBControl.Width = 800
Catch ex As Exception
End Try
End Sub
Private Sub WBControl_Previ ewDocumentCompl eted(ByVal sender As
Object, ByVal e As WebBrowserDocum entCompletedEve ntArgs)
'shows the actual preview.
WBControl.ShowP rintPreviewDial og()
End Sub
This runs fine, but it opens the dialog box for the print preview
really small. Even though I set the size to 800 x 800, it does not
resize it.
can you offer any assistance on this?
Cor Ligthert [MVP] wrote:
Dvdastor,
Why not the webbrowser? Probably every other solution will takes more from
your time.
Just my thought,
Cor
<dv******@yahoo .comschreef in bericht
news:11******** **************@ i3g2000cwc.goog legroups.com...
Hello,
Is there a way that anyone knows of to preview an HTML string and have
it formatted as HTML in a PrintPreviewDia log? In other words, can the
PrintDocument that is required for this render/understand HTML?
Everything that I have seen looks like it will just print out the raw
string and not the rendered HTML.
I know I can do this with a WebBrowser Control and the
ShowPrintPrevie wDialog method, but I was hoping to avoid using the
WebBrowser control this time.
Thanks for any help.