Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Reading items in Windows Clipboard...is this even possible?

Posted on 2013-05-16
3
Medium Priority
?
456 Views
Last Modified: 2013-05-17
I am trying to make a tool that will allow me to capture my Ctrl + C keystrokes and save the data in a file so I can access any time. I was thinking I could read items from the clipboard somehow in code and then export the items to an xml file.

 My tool would run minimized (VB.NET app). Any time I click Ctrl+C, the tool would save that to a file and my app would be able to retrieve items, even after the computer is shut down.

Is it possible to manipulate the windows clipboard in code? If so can you point me in the right direction. I have been researching and haven't found anything quite right.
0
Comment
Question by:imonfireDAMMIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 83

Accepted Solution

by:
David Johnson, CD, MVP earned 2000 total points
ID: 39173658
Sub Get_Text_From_ClipBoard()
Try
If My.Computer.Clipboard.ContainsText() Then
Dim ClipText As String
ClipText = My.Computer.Clipboard.GetText
MsgBox(ClipText)
Else
MsgBox("No Text in ClipBoard")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub

Open in new window


http://dotnetdud.blogspot.ca/2008/08/get-stored-text-from-clipboard-using.html
0
 
LVL 1

Author Closing Comment

by:imonfireDAMMIT
ID: 39175309
I seen this site when I was doing my research. I think I will go this route...thanks. I originally didn't think it would be useful but now I figured out how to pull images from the clipboard. Easier than I initially thought.
0

Featured Post

Amazon Web Services EC2 Cheat Sheet

AWS EC2 is a core part of AWS’s cloud platform, allowing users to spin up virtual machines for a variety of tasks; however, EC2’s offerings can be overwhelming. Learn the basics with our new AWS cheat sheet – this time on EC2!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
Windows Server 2003 introduced persistent Volume Shadow Copies and made 2003 a must-do upgrade.  Since then, it's been a must-implement feature for all servers doing any kind of file sharing.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question