BackgroundWorker & Clipboard

  • Thread starter Thread starter kru
  • Start date Start date
K

kru

Hi All,

Within my:

Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object,
ByVal e As System.ComponentModel.DoWorkEventArgs) Handles
BackgroundWorker1.DoWork

I call e.Result = LongRunningProcess(bw)

I have implemented the BackgroundWorker to provide start/stop
functionality for a long process.

Ever since copying code I wrote previously into this
LongRunningProcess my clipboard code does not work:
Dim result As String
result = My.Computer.Clipboard.GetText()
MsgBox(result)

Have been stumped for a while & am new to threads. I'm hoping someone
could shed some light as to how I can make calls to get clipboard text
from within a long running process called from the backgroundworker's
DoWork or suggest an alternative approach.

Any help would be much appreciated.

Kind regards,
Kru
 
Back
Top