如何让Windows剪贴板不能正常工作?
为了防止考生作弊,如何让Windows剪贴板不能正常工作?
试过改变Ctrl+C,V之类的,不行,都不能从根本上解决
怎么从根本上Windows的剪贴板不能正常工作?
最好用API之类的代码达到
[解决办法]
'新建窗体Option Explicit'让剪贴板失效''By 嗷嗷叫的老马'http://www.m5home.com/Private Const WM_DRAWCLIPBOARD As Long = &H308&Private Declare Function SetClipboardViewer Lib "user32.dll" ( _ ByVal hWnd As Long) As LongPrivate Declare Function ChangeClipboardChain Lib "user32.dll" ( _ ByVal hWnd As Long, _ ByVal hWndNext As Long) As LongDim WithEvents oSubClass As cSubclass '单类模块子类化类,作者为PctGL,下载地址:http://www.m5home.com/bak_blog/article/487.htmlDim lPreClipboard As LongPrivate Sub Form_Load() Set oSubClass = New cSubclass '对象实例化 oSubClass.SetMsgHook Me.hWnd '挂上自己 lPreClipboard = SetClipboardViewer(Me.hWnd) '插入一个观察窗口End SubPrivate Sub Form_Unload(Cancel As Integer) Call ChangeClipboardChain(Me.hWnd, lPreClipboard) '恢复下一个观察窗口 oSubClass.SetMsgUnHook '解除子类化 Set oSubClass = Nothing '销毁对象End SubPrivate Sub oSubClass_GetWindowMessage(Result As Long, ByVal cHwnd As Long, ByVal Message As Long, ByVal wParam As Long, ByVal lParam As Long) Select Case Message Case WM_DRAWCLIPBOARD '剪贴板中有内容了 Clipboard.Clear '干掉..... End Select Result = oSubClass.CallDefaultWindowProc(cHwnd, Message, wParam, lParam)End Sub