Results 1 to 17 of 17

Thread: [RESOLVED] Background Worker & Progress (reporting to the default instance of the main form)

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2011
    Posts
    27

    Resolved [RESOLVED] Background Worker & Progress (reporting to the default instance of the main form)

    I am using background worker to report progress on the screen.
    In the Main.vb I have the following code:
    Code:
        Public Sub report(ByVal sender As System.Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles bwlistener.ProgressChanged
            Dim message As String = e.UserState
            logRTB.AppendText(message & vbCrLf)
        End Sub
    When I call this from Main.vb I use:
    Code:
    bwlistener.ReportProgress(0, "Some status text goes here")
    It works great.

    The problem is when I try to call it from any other module in my project.

    When I call it OtherFile.vb:
    Code:
    Main.bwlistener.ReportProgress(0, "Some status text goes here")
    It doesn't work... The program doesn't crash. Debug goes through everything but no output is actually shown to the end user.

    Why would it not work?
    Any ideas?
    Thanks!
    Last edited by marcellus; Jun 8th, 2012 at 04:08 PM. Reason: Updated the title to reflect better the topic of the thread.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width