|
I've tested your code and it is working fine for me. I think that the problem must be somewhere else. What is the content of the Clipboard when pasting?
|
|
|
|
|
its content is te selected text from the textbox..for example if i write 'w' in my textbox and paste it to my another box it appears 'ww'
vemedya.com
|
|
|
|
|
hey friend thanks for reply..i solved my problem ..i set my form's KeyPreview false and it works now..
vemedya.com
|
|
|
|
|
Glad to help - at least your code is correct. All I could do is tell you that the problem must be somewhere else
|
|
|
|
|
CTRL/V is handled automatically by some Controls.
You make the Form react to it, but didn't tell the system that is all you want to happen, so if a suitable Control has focus, it will still oblige the CTRL/V.
Clearing KeyPreview is unlikely the solution; it was set for a reason. Look for KeyEventArgs.Handled and SuppressKeyPress.
|
|
|
|
|
I believe you want to handle an event for the control you're pasting into as opposed to handling it in the form.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
i have 17 textboxes on my form and i want the user can copy from one box and paste to another...that is why i did so
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if ((e.Modifiers == Keys.Control) && (e.KeyCode == Keys.V))
{
foreach (Control item in this.Controls)
{
if (item.GetType().Name == "TextBox")
if (item.Enabled)
item.Text = Clipboard.GetText();
}
}
}
it works well..but after i saw your replies i wonder if there is better way or i am in wrong way ?
vemedya.com
|
|
|
|
|
I found this on google (search phrase is "c# textbox events"):
http://www.vcskicks.com/clipboard-textbox.php[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
You shoulnd't have to do anything at all. The TextBox already supports Copy/Paste on its own without any code from you.
|
|
|
|
|
Hello,
I would like to extract the text with coordinates on pdf file.
Thank you verry mutch.
|
|
|
|
|
That's nice. What have you tried? What do you think your first step in the process would be.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Hello,
Is there a way to extract the text on a specific area (with coordinates)?
Thank you verry mutch.
|
|
|
|
|
|
Hello,
there are a free software?
Thank you verry mutch.
|
|
|
|
|
Yes. Your mission, should you choose to accept it, is to figure out how to do it. This message will not self destruct in 15 seconds.
|
|
|
|
|
That's nice. What have you tried? What do you think your first step in the process would be.
...sorry, it just looked fun
return 5;
|
|
|
|
|
But I so badly want to just put a big REPOST on it...
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Similar questions have been posted and answered over the last week - try searching CP
|
|
|
|
|
how to change sound frequency from microphone and out to speaker
(change speed play sound)
|
|
|
|
|
|
Good Comment.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
Your's... Not as good as his...
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
What do you keep posting such question with some link in C# forum?
|
|
|
|
|
Hello everybody ,
i have created an ASP.NET Web service application , but in the same solution i have created a class that implements IHTTPHandler interface
and i used this class in my web.config file as the main http handler for *.asmx extensions , i have put the following line
<add verb="*" path="*.asmx" validate="false" type="GAndroidService.Android.AndroidHandler,GAndroidService.Android" />
it works fine in Cassini embedded web server in visual studio .
but when i deploy it to my domain web server , it tells me it could not load this type or its dependencies whereas this class is associated with one of the solution folders.
how can i solve this problem IIS 6 ?
Human knowledge belongs to the world.
|
|
|
|
|
snouto wrote: how can i solve this problem
You could satart by posting in the correct forum[^].
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|