[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

monty0018

6/19/2008 3:27:00 PM

Hi,

I'm writing a custom clipboard application in VB .NET 2008 similar to
Ditto (http://ditto-cp.source...).
I have tried targeting .NET Frameworks 2.0, 3.0, and 3.5 with the
same
results.
I have also tried targeting x86 and x64 CPUs. I am developing on
Windows Vista SP 1 x64.


My problem is that when pasting to IE forms, nothing is pasted! It
pastes to all other tested applications as expected.


Basically, I set the text to the clipboard and use
SendKeys.Send("^V")
to send Control-V to foreground window. I am using Interop with
user32.dll's SetForegroundWindow (ByVal hwnd As IntPtr) As Long
function.


When I use SendKeys.Send() and pass the actual text as oppoesed to
Control-V, IE accepts the input as received BUT all CR's in text are
sent as {ENTER} and Posts the form. This causes undesirable results
in the form of a comment with the entire paste building at each CR.
I
have been testing with a Comment field.
-------------------------------------------------
ie, trying to paste "Hello,
World"
results in two comments;
1st comment: Hello,
2nd comment: Hello,
World


Suggestions for resolving either of these issues is greatly
appreciated. Code below;


'Dim wsh As New WshShell
' Set last active window to foreground
Form1.SetForegroundWindow(awh)
' send clipped item to application in foreground
Clipboard.SetData(DataFormats.StringFormat,
lvClipped.SelectedItems(0).Text)


'Sleeping as a workaround does not fix IE paste to form
'Threading.Thread.CurrentThread.Sleep(4000)
' Using Windows Shell doesn't help IE paste to form
'wsh.SendKeys("^V")
' dispose of my COM object
'wsh = Nothing


SendKeys.SendWait("^V")
' Flushing doesn't help IE send to form
'SendKeys.Flush()


1 Answer

O. Ezekiel Worthington

5/14/2012 10:28:00 PM

0

'Lickin' Ass and Fakin' Military Service' is a Proven Fraud, a Proven
Liar and a Proven Thief. She is the most prolific liar in this
newsgroup and also the most prolific thief of other's writings. She is
also a Stolen Valor stain on America. Note that when you reply to a
Proven Liar you encourage them to continue lying.

[][][][][][]


The DemocRAT Hall Of Shame http://www.democrathallof... asks
"Why do you always LIE?"


On Thu, 8 Oct 2009 13:12:45 -0700 (PDT), "Kickin' Ass and Takin'
Names" <old_redneck@hotmail.com> wrote:
>Early next year, world athletes will gather in Vancouver for the 2010
>Winter Olympics, and much of the U.S. will root for Americans
>competing in the Games. But for conservatives, chants of ?U-S-A, U-S-
>A? have been replaced by open disdain for our country ? proof that
>their flag-waving was never anything more than cover for rank
>partisanship.
>Viewed through this lens, right-wing celebration of Chicago?s loss
>makes perverse sense. After all, conservatives used to equate
>criticism of Bush to criticism of our nation. In their minds, Bush and
>the U.S. were one and the same.
>Today, however, they have no problem celebrating when Obama and the U.
>S. do not succeed, as in the Chicago Olympics bid.
>As far as "conservatives" are concerned, anything that can be called a
>loss for Obama is good news, no matter what it means for the US0fA.
>That?s just twisted ? and it exposes the lie of conservative
>patriotism.

Did you HOPE people would think YOU wrote that?

Oops!

YOU STOLE IT.

You STOLE it from the Fag Founder of Daily Kunt, Markos Moulitsas.

Cheers not very patriotic
By Markos Moulitsas - 10/06/09
http://thehill.com/opinion/columnists/markos-moulitas/61855-cheers-not-very...

Posted from:
The DemocRATs Hall of Shame!
http://www.democrathallof...