How do I load HTML into an instance of SHDocVw.InternetExplorer

  • Thread starter Thread starter Dick Sutton
  • Start date Start date
D

Dick Sutton

I am so close, yet oh so far! Here's the problem: I want to load a string
variable that contains HTML into an instance of SHDocVw.InternetExplorer.
Here's what I have so far:

Function ShowMonTaxes(ByVal bTax As Boolean) As Integer
Dim oIE As New SHDocVw.InternetExplorer

' set Internet Explorer properties...
oIE.Left = 225
oIE.Top = 75
oIE.Width = 680 ' width of dialog...
oIE.Height = 600
oIE.MenuBar = True
oIE.ToolBar = 1
oIE.StatusBar = False
oIE.AddressBar = False
oIE.Resizable = True
oIE.Navigate("About:blank")

While oIE.Busy : End While ' wait for page to load...

' load html into the oIE page ---
' **** what do I put here???*****

' with IE/html loaded, define assorted objects...
oIE.Visible = True

' return result
ShowMonTaxes = 0

End Function

I have a string (i.e. strHTML) that is already constructed that contains the
valid HTML results. What I'm attempting to do here is to display those
results. I am using the SHDocVw.InternetExplorer because webbrowser control
doesn't allow me to use a ToolBar (I need this so that I can easily print
the page if I so desire).

Any help would be appreciated.

Thanks in advance.

Dick
 
Cor,

Thanks for your input. However, I think you misunderstood my question. I'm
aware that I can add a ToolBar control to a form (along with a WebBrowser
control) but that requires me to program every button that I place on the
ToolBar. By using the SHDocVw.InternetExplorer approach, it uses the
standard IE toolbar and I don't have to program anything (i.e. it's much
easier).

My problem stems from my ignorance on how to place HTML text in the window
controlled by SHDocVw.InternetExplorer .

Thanks again for your help and insight.

Dick
 
Dick,

Using SHDocVw.InternetExplorer has never been easy. An extra problem is that
the documentation on MSDN is the same about the Axwebbrowser and
ShDocVw.Internetexplorer. While for the last one most events events don't
work as in AxWebbrowser.

By the way it is a long time I saw it the last time and now writting this,
did you already try the Axwebrowser and than with the instanced format of
that axweb.InternetExplorer?

Cor
 
Thanks, Cor,

I will give your suggestion (Axwebrowser) a try. I'll report back on my
progress.

Thanks again for the input.

Dick
 
Back
Top