Appreciate some help. Want to continuously check clipboard and if text
present unhide and display in a text. The following code can find nothing
in the clipboard even though I paste information there from Notepad.
\\
Public Sub btnStart_Click( ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnStart.Click
Dim t As New System.Timers.T imer(2000)
AddHandler t.Elapsed, AddressOf TimerFired
t.Enabled = True
End Sub
Public Sub TimerFired(ByVa l sender As Object, ByVal e As
System.Timers.E lapsedEventArgs )
Dim d As IDataObject = Clipboard.GetDa taObject()
If (Clipboard.GetD ataObject.GetDa taPresent(DataF ormats.Text)) Then
TextBox1.Text =
Clipboard.GetDa taObject.GetDat a(DataFormats.T ext).ToString()
End If
End Sub
//
If I debug the TimerFired sub is repeatedly called but there is nothing in
the Clipboard.
Ed
present unhide and display in a text. The following code can find nothing
in the clipboard even though I paste information there from Notepad.
\\
Public Sub btnStart_Click( ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnStart.Click
Dim t As New System.Timers.T imer(2000)
AddHandler t.Elapsed, AddressOf TimerFired
t.Enabled = True
End Sub
Public Sub TimerFired(ByVa l sender As Object, ByVal e As
System.Timers.E lapsedEventArgs )
Dim d As IDataObject = Clipboard.GetDa taObject()
If (Clipboard.GetD ataObject.GetDa taPresent(DataF ormats.Text)) Then
TextBox1.Text =
Clipboard.GetDa taObject.GetDat a(DataFormats.T ext).ToString()
End If
End Sub
//
If I debug the TimerFired sub is repeatedly called but there is nothing in
the Clipboard.
Ed
Comment