To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
Part 10 of the Visual Basic .NET 2010 Express Tutorial Complete!
How to Use the Visual Studio Code Analysis Tool FxCop
Article :: Interview with Andrei Alexandrescu (Part 3 of 3)
Introducing Visual Studio LightSwitch
Visual Studio LightSwitch Beta 1 is Available



Go Back   VBForums > Visual Basic > Visual Basic .NET

Reply Post New Thread
 
Thread Tools Display Modes
Old Jun 28th, 2007, 05:21 PM   #1
GODzillaSDM
Junior Member
 
Join Date: Apr 07
Posts: 31
GODzillaSDM is an unknown quantity at this point (<10)
Resolved [RESOLVED] extract value from window's copy CTRL+C memory

Hello,

Anyone know how can I extract the value from window's copy or ctrl+c.

for example, lets say i highlight any text or number, and copy it using ctrl+c.

Now, in my vb code, i want to extract the value from this memory, using a button, and paste it into the textbox. Is there anyway to get this value WITHOUT using ctrl+v or any variations of?

I hope i make sense.
Thanks!

Last edited by GODzillaSDM; Jun 28th, 2007 at 05:28 PM.
GODzillaSDM is offline   Reply With Quote
Old Jun 28th, 2007, 05:38 PM   #2
Atheist
Networker
 
Atheist's Avatar
 
Join Date: Aug 05
Location: Sweden
Posts: 7,416
Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)
Re: extract value from window's copy CTRL+C memory

Write
VB.Net Code:
  1. Clipboard.
in your code and intellisense should pop up with some properties, I think you will find which one suits your needs
__________________
---My Flickr photo stream. Have a look!

Rate posts that helped you. I do not reply to PM's with coding questions.
How to Get Your Questions Answered
LINQ examples | Save/load a forms layout | TCP client/server connection | Retrieving the EventHandler for any Event by code.
Check out the work in progress: Obtuze - A Neural Network for OCR | NetEmu - A library that enables netplay for emulators.
Atheist is offline   Reply With Quote
Old Jun 28th, 2007, 05:59 PM   #3
RobDog888
Super Moderator
 
RobDog888's Avatar
 
Join Date: Apr 01
Location: LA, Calif. Raiders #1 AKA:Gangsta Yoda™
Posts: 58,875
RobDog888 has a brilliant future (2000+)RobDog888 has a brilliant future (2000+)RobDog888 has a brilliant future (2000+)RobDog888 has a brilliant future (2000+)RobDog888 has a brilliant future (2000+)RobDog888 has a brilliant future (2000+)RobDog888 has a brilliant future (2000+)RobDog888 has a brilliant future (2000+)RobDog888 has a brilliant future (2000+)RobDog888 has a brilliant future (2000+)RobDog888 has a brilliant future (2000+)
Re: extract value from window's copy CTRL+C memory

something like this is one way to do it.
VB.NET Code:
  1. If Clipboard.ContainsText = True Then
  2.     Me.TextBox1.Text = Clipboard.GetData(System.Windows.Forms.DataFormats.Text)
  3. Else
  4.     MessageBox.Show("Clipboard does not contain any valid text on it.")
  5. End If
__________________
VB/Office Guru™ (AKA: Gangsta Yoda®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.

Microsoft MVP 2006, 2007, 2008, 2009, 2010
Office Development FAQ (VBA, VB 6, VB.NET, C#)
Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista (New)Multiple .NET Framework Versions (New)Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 150 GB HDs RAID 1, 2 GBs DDR2 667 MHz RAM, 3 Viewsonic 17" LCDs, Windows Vista RTM, IE 7, Office 2007
RobDog888 is offline   Reply With Quote
Old Jun 28th, 2007, 09:12 PM   #4
GODzillaSDM
Junior Member
 
Join Date: Apr 07
Posts: 31
GODzillaSDM is an unknown quantity at this point (<10)
Re: extract value from window's copy CTRL+C memory

awesome! thanks guys!! i'll go try it out.
GODzillaSDM is offline   Reply With Quote
Reply

Go Back   VBForums > Visual Basic > Visual Basic .NET


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:11 AM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.