473,411 Members | 2,129 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,411 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 2933
"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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.