That was the method I was thinking of using but in the end it is no good, in my opinion. The WebBrowser control always appears with a border, and always puts in a vertical scroll bar (at least it does here, even though the documentation claims otherwise). Which is a pain.
We just need an alternative to the WebBrowser control that doesn't suffer from these drawbacks...and the DHTML Edit Control for IE5 is ideal.
Add the above to your project as a component. Drop a DHTMLSafe control onto your form, and add a command button. Then copy and paste the following code:
Option Explicit
Private Sub Command1_Click()
LoadDHTMLImage "<full_path_to_your_gif_file>"
End Sub
Public Function LoadDHTMLImage(strFile As String) As Boolean
Dim myHTML As String
Dim picDummy As StdPicture
Dim strImageLoad As String
Set picDummy = LoadPicture(strFile)
DHTMLSafe1.Width = ScaleX(picDummy.Width, 6, 1) / 100 ' scale from STDPicture's HiMetric to Twips
DHTMLSafe1.Height = ScaleY(picDummy.Height, 6, 1) / 100 ' scale from STDPicture's HiMetric to Twips
' Note: we are forming REALLY bad HTML here, but it does the job...
strImageLoad = "<img src='file:///" + strFile + "'>"
myHTML = "<body topmargin='0' leftmargin='0'>"
myHTML = myHTML + strImageLoad
myHTML = myHTML + "</body>"
DHTMLSafe1.NewDocument
DHTMLSafe1.DocumentHTML = myHTML
End Function