473,387 Members | 1,497 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Disable clipboard paste in textbox ?

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
Nov 21 '05 #1
2 2931
"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/>
Nov 21 '05 #2

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OD**************@TK2MSFTNGP12.phx.gbl...
"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


Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Du Dang | last post by:
I use this in ie and it works just fine. Hoever when i use it in opera, the browser have a problem with the "createTextRange" bit. ============================= var txtHandler =...
1
by: fs | last post by:
Hi all, I have a page that i need to implement a button that says "Paste to textbox1", which will paste the text content in clipboard to a textbox control on postback. How can I get values from...
3
by: Stilgar[bbs.isca.uiowa.edu] | last post by:
Here's my newbie question: I have several VB forms which are all inherit a standard template form that I made. In my template form, I added a menu bar with some generic cut, copy, and paste...
3
by: mamatha | last post by:
Hi I have one VB application,in that one form consits of textbox. Textbox conatains some data,i want to copy and paste that data into another application without using clipboard oprations.How...
1
by: Rulin Hong | last post by:
Menu "Paste" in textbox control's built-in contextmenu will be automaticaly enabled while having text in clipboard. I want to disable the menu when text in clipboard didn't meet my format. I...
8
by: serge calderara | last post by:
Dear all, I have an treeview control with different node object, I would like to implement the Copy/Paste function of an object . For that I am using the folowing function to copy teh object to...
6
by: =?Utf-8?B?TWljaGFlbCAwMw==?= | last post by:
I need to disable the clipboard function in Windows XP. We are having a problem with users using CTRL+C in one program, then using CTRL+V in another. Specifically, they type their password into...
3
by: Jaez | last post by:
As a newbie to javascript and asp.net 2 I have come across a problem related to the windows clipboard. I have written an application in vb6 which collects data and puts it on the user's...
1
by: gurpreetintown | last post by:
how can i disable the feature of pasting clipboard contents into a textbox MOD -- Changed title to be descriptive
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.