Ok, so this is a quite hard thing to google for.
I found only one person who had the same issue, but he had posted it on that lame forum we all know.. the one who wants you to pay and register, to read on the forums..
Anyhow, Here is my issue:
I have made a "copybrowser", eg. it is a webbrowser in C# 2008, which listens for keyboard events.
What it triggers on, is
This works perfectly and it's really nice to watch my application trigger on copy events.
What it does, is quite simply:
So, where is my problem?
Well, my problem is that GetDataObject is "one step in the past".
I fill the Clipboard with using CTRL+C and it works, but I have to "doublecopy" if I wish to get my result at once.
Eg. if I have some text:
abc def geh
And I first copy abc, nothing happends.
If I then copy def, I get abc.
I think you get my problem.
I have tried clearing the Clipboard in the Program.cs - static void Main().
I also tried adding "" to the Clipboard, hoping it might "push" the array.
I have searched on google and on msdn, but I cant seem to find this fault, which I guess is just a MINOR fault
Hope someone can help me!
ps. it's a non profit thingy for my work, so we can search on a custom webpage we are building atm., since we have no way to integrate two of our major archival systems! (and the archival storage-id's are very easy to mis spell, so it's important to have something slick).
Olav Alexander Mjelde
I found only one person who had the same issue, but he had posted it on that lame forum we all know.. the one who wants you to pay and register, to read on the forums..
Anyhow, Here is my issue:
I have made a "copybrowser", eg. it is a webbrowser in C# 2008, which listens for keyboard events.
What it triggers on, is
Code:
if (Keys.C == (Keys)vkCode && Keys.Control == Control.ModifierKeys)
This works perfectly and it's really nice to watch my application trigger on copy events.
What it does, is quite simply:
Code:
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text, true))
{
frm2.setSearch(Clipboard.GetDataObject().GetData(DataFormats.Text, true).ToString());
}
So, where is my problem?
Well, my problem is that GetDataObject is "one step in the past".
I fill the Clipboard with using CTRL+C and it works, but I have to "doublecopy" if I wish to get my result at once.
Eg. if I have some text:
abc def geh
And I first copy abc, nothing happends.
If I then copy def, I get abc.
I think you get my problem.
I have tried clearing the Clipboard in the Program.cs - static void Main().
I also tried adding "" to the Clipboard, hoping it might "push" the array.
I have searched on google and on msdn, but I cant seem to find this fault, which I guess is just a MINOR fault
Hope someone can help me!
ps. it's a non profit thingy for my work, so we can search on a custom webpage we are building atm., since we have no way to integrate two of our major archival systems! (and the archival storage-id's are very easy to mis spell, so it's important to have something slick).
Olav Alexander Mjelde