473,790 Members | 3,246 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Prevent Paste outside my app

Hello,

I am looking for a clever way to prevent someone from pasting copied text
outside of my app.

I know how to monitor the clipboard and get an WM_DRAWCLIPBOAR D message when
text is stored in the clipboard... If only I could detect some kind of
outgoing message that the clipboard is about to paste, then I could check to
see if my app is currently in focus and allow/deny as necessary.

I would just erase the clipboard upon the app loosing focus, but I can see
cases where that would be a pain to the user if they just had to click
somewhere else real quick.

Anyone have any ideas?

Thank you all for reading this.

Rob K
May 23 '06
11 2175
Yes, but they can still scan the bitmap to get and decode the text.

If you allow people to read your text on the screen, they will find a way to
copy it.

Dan Manges wrote:
Rob,

You could prevent users from selecting the text. If they can't select
the text, they could still take a screenshot, but they wouldn't be able
to actually copy and paste text. May be an easier solution than working
with the clipboard.

Dan

May 25 '06 #11
>> Looks like we are going to have to clear the clipboard when my App looses focus since I can't figure out how to detect if they are pasting outside my app. <<<

That has it's own problem. For example, I have AppA, AppB and your app
all running. I copy something from AppA intending to copy it to AppB.
I Alt-Tab --- ooop, I go too far and activate your app. No problem, I
just ALt-Tab again to get to AppB -- and Poof -- My clipboard is empty.

May 25 '06 #12

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

Similar topics

5
2324
by: Daniel | last post by:
Does anyone know how this can be done? Thanks
6
8794
by: William J. Leary Jr. | last post by:
I'm running a VB6 program, the IDE for a compiler. Paste doesn't work if the text was cut/copied from within the program. That is: 1. Cut/copy inside the program, can't paste. Program: CTRL-V doesn't work, "Paste" grayed out in menu. 2. Cut/copy inside the program, CAN paste to another program (i.e.: Notepad).
8
1954
by: Arno R | last post by:
Hi all, Is the above possible? I guess I need an API call for this ? How and where to find this? One of my new apps is used as a sort of 'dedicated' thing. Users see an empty desktop with *only* two buttons. They only click a button to start the app. (They have two apps they need to work with) When they minimise the app (and some do this accidently...) the app is NOT visible anymore in a taskbar or so. In fact there is NO taskbar... ...
17
5485
by: emma.sax | last post by:
Hi all, I have a form where we would like the user to input their email address twice, to ensure they've typed it correctly, as is found on most sign-ups I'm looking for a solution to the problem where a user (and me it has to be said) just either highlights the email address with their mouse (or Ctrl-A) and then Ctrl-C, Ctrl-P (or right-click copy, right-click paste) into the next field down.
2
2384
by: sukeshchand | last post by:
How to prevent changes in textbox when we use Ctrl+V or Paste using mouse without effecting the previously stored values in the text box. I want to Prevent the changes in the textbox by using certen conditions, first i use keyascii event to Control it, it is working where the user enter values to by using keyboard. but it is not working when the user copy some values from anoter position and pase it by using mouse.
12
3976
by: Larry Bud | last post by:
I rarely crosspost, but this affects both ASP and Javascript REALLY odd bug that I ran across in ASP 3.0. I have an input type of file, user clicks browse, then places his cursor in the filename, puts a space at the end of the file, and uploads it. Web server doesn't translate the MIME type of document properly because it doesn't end with a valid extension, yet the file itself uploads successfully. I'm using SAFileUP for my uploading...
2
2290
by: AjitGoel | last post by:
Hi; I need to create a custom textbox control which will not allow a user to paste text from the clipboard. The user has to always type the text into the textbox. I tried searching on the internet since I guessed someone would have faced this problem before but of no avail. Do we have pointers on how I should go about doing this??
2
2876
arnabc
by: arnabc | last post by:
Hi all, I am developing one online forum kind of website where users have the facility to submit there comments and to do that we r using one custom made rich text editor. So far it was fine but suddenly I discovered that one can paste a large amount of text or a Big Image in the Rich text editor which was not a desired thing because we set up a maximum limit of text one can enter and the Big image problem is that we have the option to insert...
3
5299
by: GarryJones | last post by:
I found this handy little script on the net that means the user can only press backspace or numbers in form input. <script type="text/javascript"> function numbersonly(e){ var unicode=e.charCode? e.charCode : e.keyCode if (unicode!=8){ //if the key isn't the backspace key (which we should allow) if (unicode<48||unicode>57) //if not a number return false //disable key press
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9512
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10419
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10201
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10147
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9023
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7531
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5424
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4100
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.