BackgroundWorker & Clipboard

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kru

    BackgroundWorker & Clipboard

    Hi All,

    Within my:

    Private Sub BackgroundWorke r1_DoWork(ByVal sender As System.Object,
    ByVal e As System.Componen tModel.DoWorkEv entArgs) Handles
    BackgroundWorke r1.DoWork

    I call e.Result = LongRunningProc ess(bw)

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

    Ever since copying code I wrote previously into this
    LongRunningProc ess my clipboard code does not work:
    Dim result As String
    result = My.Computer.Cli pboard.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 backgroundworke r's
    DoWork or suggest an alternative approach.

    Any help would be much appreciated.

    Kind regards,
    Kru
Working...