16,718
社区成员
发帖
与我相关
我的任务
分享
new System.Threading.Thread(
() => {
MessageBox.Show("你好");
System.Threading.Thread.Sleep(3000);
MessageBox.Show("大家好");
}
).Start();
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim RunTime As Date = Now()
MsgBox("你好")
Do
My.Application.DoEvents() '释放控制权给程序的其他事件
Dim i As Integer = DateDiff("s", RunTime, Now)
If i > 5 Then Exit Do
Loop
MsgBox("大家好")
End Sub
messagebox.show("你好");
System.Threading.Thread.Sleep(10*1000);
messagebox.show("大家好")
Private Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)
Private Sub Form_click()
MsgBox "你好1"
DoEvents
Sleep 1000 * 10
MsgBox "你好2"
End Sub
Thread.Sleep(10*1000);
//开启新线程