Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-05-16
3
Medium Priority
?
458 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
3 Comments
 
LVL 84

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Windows 10 Creator Update has just been released and I have it working very well on my laptop. Read below for issues, fixes and ideas.
Unable to change the program that handles the scan event from a network attached Canon/Brother printer/scanner. This means you'll always have to choose which program handles this action, e.g. ControlCenter4 (in the case of a Brother).
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

927 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