Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Disable PopUpMenu and Ctrl + V in a textbox 1

Status
Not open for further replies.

YL99

Programmer
Dec 23, 2002
24
0
0
GB
Hello,
I want to disable popupmenu and ctrl + V(paste )in a textbox.

I would be grateful for you help.
Many thanks in advance.

 
How about doing onKeyUp and check for ctrl, then check for V, and if they are both there setting the textbox's Text property to ""? That should fix the ctrl+v problem. I've still got to give the other some thought...
Crystalinity
 
The popup is a problem

You need to disable the control at a point when the control would display the popup, you then renable the control.

Something like

Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = vbRightButton Then
Text1.Enabled = False
' code
End If

Text1.Enabled = True

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top