VB in textbox the best way to prohibit the copy and paste function inside the right-click menu. Txt
- thistedle50ribdgl
- Jun 16, 2020
- 1 min read
How does VB prohibit the copy and paste function in the right-click menu in the textbox lsdiddefh8611 classification: Other folks happen to be browsed 370 occasions 2013.05.30
Do not copy it directly in the World-wide-web. I need to answer my query simply because I have searched on line and I've not identified the answer I want. ①Restrict the function with the keyboard ctrl+c, ctrl+v, ②Restrict the proper mouse button out The copy and paste function in the right-click menu. What does shiftand2 imply?You may choose to clear the clipboard function or textbox1.locked=false to clarify to me. The functions I located are as follows PrivateSubText2_KeyDown(KeyCodeAsInteger, ShiftAsInteger) IfKeyCode=vbKeyVAnd(ShiftAnd2)ThenText2.Locked= TrueEndIfIfKeyCode=vbKeyCAnd(ShiftAnd2)ThenText2.Locked=TrueEndIf
EndSub this section only restricts the paste of keys as well as the copy in the right important. I also wish to limit the copy on the keys along with the paste in the proper essential menu. Thank repair mp3 file for answering the answer. Give a detailed score to p34m1cj8i. Adoption rate: 40% 11th grade 2013.05.30
(The Lock house only prevents the text box from receiving user input, but it can still be pasted.) Draw a text box inside the type, open the code window, and copy the code into it:
PrivateSubText1_KeyPress(KeyAsciiAsInteger)
IfKeyAscii=3Then
MsgBox 'Do not copy illegally!'
KeyAscii=0
ElseIfKeyAscii=22Then
MsgBox 'Do not paste illegally!'
KeyAscii=0
EndIf
EndSub
PrivateSubText1_MouseDown(ButtonAsInteger, ShiftAsInteger, XAsSingle, YAsSingle)
IfButton=2Then
MsgBox 'Forbid right-clicking in text boxes!'
Comentarios