borderAndreaVB free resources for Visual Basic developersborder
borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2016 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (Problem with Forum) New Topic New Poll Post Reply
AndreaVB Forum : VB General : WebBrowser control - disabling functions
Poster Message
kepler
Level: Trainee

Registered: 03-05-2016
Posts: 1

icon WebBrowser control - disabling functions

Good afternoon,

Is there a quick way of disabling copy/paste in a WebBrowser view in VB6 without having to set javascript code? I'm not displaying previous made html pages, but setting the code in my program. So I can put some JS.
Still I find it odd that we cannot disable easely these kind of functions...

I only come up with 2 solutions so far:

1) Create a Timer which looks up to the Clipboard content and, if belongs to the program webpage, clears it... It's quite simple.

2) Or insert in the Html the code something like:

img src='Blank.png' style='width:100%;min-height:100%;position:absolute;top:0;left:0;zIndex:99999;' id='fblank'


Of course the image path must be given in full (App.Path & "\Blank.png") and Blank.png must be a transparent PNG image- I've tested it.

Disabling the right mouse button isn't enough - the copy is enabled with the simple Ctrl+C...

Regards,

Kepler

[Edited by admin on 06-06-2016 at 08:17 PM GMT]

03-05-2016 at 11:01 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : WebBrowser control - disabling functions
Next Topic (Problem with Forum) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
borderAndreaVB free resources for Visual Basic developersborder
borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2016 Andrea Tincaniborder