473,397 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Invoking CTRL+C,X,V programatically

Hi Guys,

I need to be able to perform cop/cut/paste in any textbox of the application
i have focus on USING a button (not key combination). how can I invoke the
^C, ^X and ^V programatically?

I tried something like:
Private Sub btnPaste_Click(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles
btnPaste.Click
System.Windows.Forms.SendKeys.Send("^(v)")
End Sub

-Didn't work

Any idea?

Thanks!

Apr 1 '06 #1
2 2094
I wouldn't bother with keystrokes..

Instead look at the System.Windows.Forms.Clipboard class and it's methods.

"Ori :)" <Or*@discussions.microsoft.com> wrote in message
news:1D**********************************@microsof t.com...
Hi Guys,

I need to be able to perform cop/cut/paste in any textbox of the
application
i have focus on USING a button (not key combination). how can I invoke the
^C, ^X and ^V programatically?

I tried something like:
Private Sub btnPaste_Click(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles
btnPaste.Click
System.Windows.Forms.SendKeys.Send("^(v)")
End Sub

-Didn't work

Any idea?

Thanks!

Apr 1 '06 #2
"Ori :)" <Or*@discussions.microsoft.com> schrieb:
I need to be able to perform cop/cut/paste in any textbox of the
application
i have focus on USING a button (not key combination). how can I invoke the
^C, ^X and ^V programatically?

I tried something like:
Private Sub btnPaste_Click(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles
btnPaste.Click
System.Windows.Forms.SendKeys.Send("^(v)")
End Sub


\\\
If TypeOf Me.ActiveControl Is TextBoxBase Then
DirectCast(Me.ActiveControl, TextBoxBase).Copy()
End If
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Apr 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Mike Maxwell | last post by:
<vent> I see there has been traffic over the years on this gripe, so just let me vent my frustration, and add another reason why 'exit' (or possibly exit() or quit() or halt() or some such) should...
4
by: Scott | last post by:
I am using a TCPIP connection to communicate over port 23 (telnet) to a server, and I am having to mimic normal command line interface you owuld see in a telnet session (i.e. I have to write to...
3
by: Glen Hong | last post by:
I have set up a hotkey using RegisterHotKey API function for Ctrl-Tab. Firstly, I can rap this when Ctrl-Tab is pressed however if I want to add an addition hotkey how can I distinguish between...
1
by: carmen | last post by:
Hi, I have searched through msdn documentation, but couldnt figure this out. I have written a console application that starts a process using the Process class in system.diagnostics namespace. I...
2
by: crjunk | last post by:
I'm trying to write a piece of code that will programatically save a record automatically without me having to add a new ' Row.Item("ADD1") = txtAdd1.Text.Trim.ToUpper ' type command each time I...
12
by: mfibrik | last post by:
hi, when i ask my program to restart the PC by Code ((Shell "Shutdown -r -f -t 0")) it's open again up to the login windows I need the code which allow me to send the ctrl+alt+Del to open...
4
by: Gordon | last post by:
Just a quickie. Is there a way to cause a browser to open it's find... dialogue in response to an event, say a click on a button? The idea is that there's a list of addresses that a client has...
1
by: amollokhande1 | last post by:
Hi, I have one query regarding the webservice Invocation. I have one simple webserive. I want to invoke it in VB.Net. I have all required input like contenttype,method,namespaceuri,webservice etc....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.