WebBrower控件显示html代码及打印

Private Sub Command1_Click()
WebBrowser1.ExecWB 6, 1
End Sub

Private Sub Command2_Click()
WebBrowser1.Navigate2 "http://www.google.com"

End Sub

Private Sub Command3_Click()
'WebBrowser1.Navigate "about:blank"
WebBrowser1.Document.open
WebBrowser1.Document.writeln ""
WebBrowser1.Document.writeln ""
WebBrowser1.Document.writeln ""
WebBrowser1.Document.writeln ""
WebBrowser1.Document.writeln "444"
WebBrowser1.Document.writeln "444ttt"
WebBrowser1.Document.Close

End Sub

Private Sub Command4_Click()
Dim wb As New WebBrowser_V1

wb.Navigate "about:blank"
wb.Document.open
wb.Document.writeln ""
wb.Document.writeln ""
wb.Document.writeln ""
wb.Document.writeln ""
wb.Document.writeln "444"
wb.Document.writeln "444ttt"
wb.Document.Close
wb.ExecWB 4, 1

End Sub

你可能感兴趣的:(html)