是否有任何界面可以阻止从Web浏览器中选择文本,而不是使用javascript? [英] Is there any interface to prevent select text from webbrowser,not do with javascript?

查看:64
本文介绍了是否有任何界面可以阻止从Web浏览器中选择文本,而不是使用javascript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在mfc项目中使用网络浏览器.
但是我不知道如何防止从webbrowser.google中选择文本,结果是"javascript函数",任何接口都可以直接执行?

I''m try to use webbrowser in mfc project.
But I don''t know how to prevent select text from webbrowser.google result is "javascript function", any interface could do directly?

推荐答案

没有接口可以阻止任何事物.接口就是接口.
而且,据我所知,始终可以在Web浏览器中进行选择.我一直认为这非常好:一个人随时可以复制内容的任何部分.为什么有人需要预防呢?


Nishant建议的技巧一定会奏效.与他达成一致,我认为这没有实际意义.如果您的想法是对任何内容进行版权保护,那么这实际上没有任何意义,只会使版权保护更加困难.为什么?

—SA
No interfaces can prevent anything. Interfaces are interfaces.
And no, selection in the Web browser is always available, to best of my knowledge. I always thought it is very good: one can always copy any part of content at any time. Why anyone would need to prevent it?


The trick suggested by Nishant will certainly work. In agreement with him, I don''t think it makes practical sense. If your idea is to copy-protect any content — it makes no practical sense, would only make copy more difficult. Why?

—SA


您可以对托管的Web浏览器使用透明的静态控件.但这将阻止用户选择任何内容(而不仅仅是文本).

但是,这是实施复制保护的一种非常差劲且无效的方法.用户仍然可以进行屏幕截图并从中获取文字.所以也要注意这一点.
You could use a transparent static control over your hosted web browser. But this will prevent the user from selecting anything (not just text).

But this is a very poor and ineffective way to implement copy-protection. The user can still take a screen capture and get the text out of that. So be aware of that too.


正如其他人所说,不可能阻止所有事情……即用户在屏幕上拍照然后重写文本……^^¡

我会:

1.显示Web控件,然后捕获并丢弃:
1.1.按下鼠标左键时所有的鼠标事件.
1.2.按下Shift + F1和菜单键.
1.3. PrintScr键.
1.4. Ctrl + C和Shift(我不记得其他选项(也许要插入?).)
2.在Web控件获得焦点时,立即将焦点置于另一个窗口.

为没有错过任何可能性而祈祷...

PS:您正处于失败的战斗中……也就是说,还有许多其他工具可以抢占屏幕……
PS2:Nish一个更快,更轻松,您将获得相同的结果...
PS3:SAKryukov也完全正确.

祝你好运...
As others say it is impossible to prevent everything... i.e. the user taking a picture on the screen and then rewriting the text... ^^¡

I would:

1. Show the web control and then capture and discard:
1.1. All the mouse events with the left button pressed.
1.2. The press of the Shift+F1 and the menu key.
1.3. PrintScr key.
1.4. Ctrl+C and Shift (I don''t remember the other option (Insert perhaps?)).
2. Put the focus to another window just at the moment it is gained by the web control.

Pray for not having missed any of the possibilities...

PS: you are in a lost battle... i.e. there are plenty of other tools that will grab the screen...
PS2: Nish one is faster, easier and you''ll get the same result...
PS3: And SAKryukov is completely right too.

Good luck...


这篇关于是否有任何界面可以阻止从Web浏览器中选择文本,而不是使用javascript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆