PC Review


Reply
Thread Tools Rate Thread

Disable clipboard paste in textbox ?

 
 
Steve
Guest
Posts: n/a
 
      8th Mar 2005
Hi all,

Is it possible to disable pasting from the clipboard into a textbox ?? I
can't find a property for it but I guess it must be possible.

thanks
Steve


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      8th Mar 2005
"Steve" <@> schrieb:
> Is it possible to disable pasting from the clipboard into a textbox ??


I am just curious why you need this feature...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
 
Reply With Quote
 
Steve
Guest
Posts: n/a
 
      9th Mar 2005

"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Steve" <@> schrieb:
>> Is it possible to disable pasting from the clipboard into a textbox ??

>
> I am just curious why you need this feature...


As a way of preventing invalid characters being entered into a textbox. I
use code with the .keypress event to filter out invalid keystrokes in
textboxes, in order to only allow the user to type certain characters. This
doesn't however prevent them from pasting in invalid characters from the
clipboard, and so to be 100% sure I also have to validate the final text
before use. Disabling paste would mean I wouldn't need that second
validation.

You also often see pasting disabled in forms such as password confirmation,
whereby the user is forced to manually type the password again rather than
just doing a copy/paste.

thanks
Steve




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to paste clipboard into textbox sheet? HammerJoe@gmail.com Microsoft Excel Programming 4 1st Feb 2008 04:23 PM
Clipboard gets empty by itself, cleared clipboard, copy paste doesn't work, outlook clears clipboard, problems with clipboard - possible solution Jens Hoerburger Microsoft Outlook 0 24th Aug 2006 02:44 PM
Disable copy/paste clipboard between Client and Server only? ThomasT. Microsoft Windows 2000 Terminal Server Clients 1 4th Mar 2006 12:52 PM
How do I disable Office Clipboard so Copy Paste uses traditional Windows Clipboard dwilliamson@ivsi.com Microsoft Excel Discussion 10 24th Feb 2005 02:36 PM
Disable Cut & Paste (Clipboard) Bart Microsoft Windows 2000 3 11th Nov 2003 09:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:06 PM.