I placed a rotating banner from my website in my application. The problem is that I only want the browser to show the banner and none of the surrounding website. How can I crop the browser to show only the banner?
Printable View
I placed a rotating banner from my website in my application. The problem is that I only want the browser to show the banner and none of the surrounding website. How can I crop the browser to show only the banner?
Add a Picturebox to the Form and place the WebBrowser control within it (so the Picturebox is the WebBrowsers Parent.), i.e.Code:Private Sub Command1_Click()
On Error GoTo Load_Cancel
With CommonDialog1
.CancelError = True
.DialogTitle = "Open an Animated GIF"
.Filter = "GIFS (*.GIF)|*.GIF"
.ShowOpen
WebBrowser1.Navigate .FileName
WebBrowser1.Move ScaleX(-12, vbPixels, vbTwips), ScaleY(-19, vbPixels, vbTwips), Width, Height
Picture1 = LoadPicture(.FileName)
Picture1.AutoSize = True
End With
Load_Cancel:
End Sub