Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

I was wondering if anyone know the code for this problem.

 

I was to click a button and have the text from within txtbox1 'copied' to the clipboard.

 

I pretty much want the button to act as a ctrl+c.

 

if anyone can help me that would be great.

Edited by Talk2Tom11
Posted

If you are using VS 2005 ...

 

It's quite simple in Visual Studio 2005:

 

My.Computer.Clipboard.SetText(TextBox1.Text)

 

But if you're using an older version this won't work.

  • Leaders
Posted
It's quite simple in Visual Studio 2005:

 

My.Computer.Clipboard.SetText(TextBox1.Text)

 

But if you're using an older version this won't work.

Keep in mind that the My keyword is exclusive to VB 2005, not VS 2005

[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...