Dim Val As string = Rand.Next(100000) '生成0到99999之间的随机整数 Dim s As String = val.PadLeft(5, "0") Dim txt As WinForm.TextBox = e.Form.Controls("TextBox1") txt.text = s
2、参考
Dim sdt As Date = Date.Now While Date.Now < sdt.AddSeconds(10) Application.DoEvents End While