fork download
  1. Public Class Form1
  2.  
  3. Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
  4. Me.BackgroundWorker1.RunWorkerAsync()
  5. End Sub
  6.  
  7. Private Sub BackgroundWorker1_DoWork(sender As System.Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
  8.  
  9. For i As Integer = 0 To 9
  10. Me.BeginInvoke(Sub(cnt)
  11. Dim b = New Button()
  12. b.Text = cnt.ToString()
  13. b.Top = b.Height * cnt
  14. Me.Controls.Add(b)
  15.  
  16. End Sub,
  17. New Object() {i})
  18. Next
  19. End Sub
  20. End Class
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty