Solved

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

Posted on 2013-05-16
3
447 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
 

Expert Comment

by:RyteBytes
ID: 39173531
0
 
LVL 79

Accepted Solution

by:
David Johnson, CD, MVP earned 500 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

773 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