VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Disable Paste

Johan  (1 Submission)   Miscellaneous   Visual Basic 3.0   Advanced   Wed 3rd February 2021

Disable paste in a textbox.

API Declarations
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const GWL_WNDPROC = (-4)
Public Const WM_PASTE = &H302
Type POINTAPI
x As Long
y As Long
End Type
Type Msg
hwnd As Long
message As Long
wParam As Long
lParam As Long
time As Long
pt As POINTAPI
End Type

Rate Disable Paste (8(8 Vote))
Disable Paste.bas

Disable Paste Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters