e.Form.TimerEnabled = True Dim Val As String = Rand.Next(100000) Dim s As String = val.PadLeft(5, "2") Dim txt As WinForm.TextBox = e.Form.Controls("TextBox1") txt.text = s
Dim sdt As Date = Date.Now While Date.Now < sdt.AddSeconds(10) Application.DoEvents e.Form.TimerEnabled = False End While