Question: I have several tableviews, one of them uses coredata and others get data from a json api. In my tableview which gets data from coredata, when I launch the app there is a cell, but my coredata is empty. Cell disappears when I reload the table. 
How am I going to remove that cell?

Answer: 
```
Private ImBusy As Boolean = False

Private Sub LookBusyForTheBoss()
    Me.UseWaitCursor = True
    Me.Cursor = Cursors.WaitCursor
    Me.Enabled = False
    ProgressBar1.UseWaitCursor = False
    ProgressBar1.Style = ProgressBarStyle.Marquee

    ImBusy = True
End Sub

Private Sub Form77_FormClosing(...) Handles Me.FormClosing
    If ImBusy Then e.Cancel = True
End Sub

Private Sub OkHeIsGone()
    Me.UseWaitCursor = False
    Me.Cursor = Cursors.Default
    Me.Enabled = True

    ImBusy = False
End Sub

```
Something along these lines might work:

```
Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
    doNotClose = True
    Do
        '
        'etc
        '
        'simulate long running 
        For x As Integer = 1 To 1000
            Threading.Thread.Sleep(10)
        Next
        Exit Do
    Loop
    doNotClose = False
    If closerequested Then
        Me.BeginInvoke(Sub()
                           Me.Close()
                       End Sub)
    End If
End Sub

Dim doNotClose As Boolean = False
Dim closerequested As Boolean = False

Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
    closerequested = True
    If doNotClose Then
        e.Cancel = True
        Exit Sub
    End If
End Sub

```

or this

```
Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
    doNotClose = True
    Do
        '
        'etc
        '
        'simulate long running 
        For x As Integer = 1 To 1000
            Threading.Thread.Sleep(10)
        Next
        Exit Do
    Loop
    doNotClose = False
End Sub

Private Sub BackgroundWorker1_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
    If closerequested Then
        Me.Close()
    End If
End Sub

Dim doNotClose As Boolean = False
Dim closerequested As Boolean = False

Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
    closerequested = True
    If doNotClose Then
        e.Cancel = True
        Exit Sub
    End If
End Sub

```