VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Constantly clear the clipboard using a timer to prevent copy/paste.

by Jos¨ E. Cruz Blas (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 20th May 2009
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Constantly clear the clipboard using a timer to prevent copy/paste.

API Declarations



Option Explicit
Private Declare Function Sleep Lib "kernel32" (ByVal dwmilliseconds As Long) As Long

Rate Constantly clear the clipboard using a timer to prevent copy/paste.



If App.PrevInstance Then End
     App.TaskVisible = False
End Sub

''************************************
Private Sub Timer1_Timer()

    Dim inc As Integer
     On Error GoTo Save_Me

    Timer1.Interval = 250
    Clipboard.Clear

Exit Sub

''****************************************
''****************************************

Save_Me:
  
  If Err = 521 Then
    If inc > 10 Then
          MsgBox "Contact the owner, Error 521" & vbCrLf & "Urgent"
      Else
          inc = inc + 1
          Sleep 100
          Resume
      End If
    Else
        MsgBox Error$
    End If
End Sub


 




Download this snippet    Add to My Saved Code

Constantly clear the clipboard using a timer to prevent copy/paste. Comments

No comments have been posted about Constantly clear the clipboard using a timer to prevent copy/paste.. Why not be the first to post a comment about Constantly clear the clipboard using a timer to prevent copy/paste..

Post your comment

Subject:
Message:
0/1000 characters