0
    Public Sub New()

    ' This call is required by the designer.
    InitializeComponent()

    ' Add any initialization after the InitializeComponent() call.
    Dim t As New Threading.Thread(AddressOf Start)
    t.Start()
End Sub
Private Delegate Sub StartDelegate()
Private Sub Start()
    If Me.InvokeRequired = True Then
        Invoke(New StartDelegate(AddressOf Start))
    Else
        For i = 0 To 10000000 Step 1 : Me.Text = i : Next i
    End If
End Sub

When I start the program it runs and start to count but U can't move the form and there are no cross thread errors.

Thanks in advance.

Al.Pertro
  • 175
  • 1
  • 6
  • try to write me.refresh() after me.text=i – Indranil.Bharambe Dec 14 '13 at 07:07
  • 1
    This is expected behavior, because Start runs in the main thread. Don't invoke the whole Start function, leave it running in it's own thread. Invoke only progress notifications (Me.Text = i), better once per several loops (for example, 100 or 1000). – Alex F Dec 14 '13 at 07:10

0 Answers0