Prevent dragging from webbrowser
Hi,
I am using a webbrowser control to display a page, and I'm looking for a way to prevent the user from being able to drag a link/picture etc. from the webbrowser control to somewhere else (eg. desktop).
I searched through the forum and Kzin asked a similar question back in 2002, but didn't get an answer.
Anyone got any ideas?
Cheers,
Nap
Re: Prevent dragging from webbrowser
Easy one ;)
add a reference to the Microsoft HTML Object Library
VB Code:
Dim WithEvents HTML As HTMLDocument
Private Sub Form_Load()
WebBrowser1.Navigate "http://www.google.com"
End Sub
Private Function HTML_ondragstart() As Boolean
HTML_ondragstart = False
End Function
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If (pDisp Is WebBrowser1.Application) Then
Set HTML = WebBrowser1.Document
End If
End Sub
Re: Prevent dragging from webbrowser
Static,
As you said, easy.
Thnx.
Cheers,
Nap
Re: Prevent dragging from webbrowser