|
Hi John,
I think you will find that
string x = "";<br />
x.GetType().GetProperties()
is exactly the same as
Type.GetType("System.String").GetProperties()
Thanks for taking the time to answer though
Regards
Andy
|
|
|
|
|
Yeah, I know, but stranger things have happened in .Net.
".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
|
|
|
|
|
Is there a way to still sort the Class View by type (without grouping by type) and have the enums that are defined within a class only display within that class like members do?
|
|
|
|
|
i want to copy a tex from texbox and paste it another one in my form
i copy it with that code
Clipboard.SetText(textBox1.SelectedText);
and paste it with that
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if ((e.Modifiers == Keys.Control)&&(e.KeyCode == Keys.V))
textBox2.Text = Clipboard.GetText();
}
but the problem is it pastes selceted text two times but when i try like that
(e.Modifiers == Keys.Control)
it pastes one time
what should i do now ?
vemedya.com
|
|
|
|
|
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[ ^]
|
|
|
|