![]() ![]() |
|
别让MsgBox中断了一些Background的处理作业 | |
作者:佚名 文章来源:不详 点击数 更新时间:2008/4/18 14:54:51 文章录入:杜斌 责任编辑:杜斌 | |
|
|
要解决这个问题,您必须使用 Windows API 去呼叫 MessageBox Function,它的使用方法、外观和 MsgBox 的结果完全相同,但是它却不会中断一些 Background 的处理作业! 在以下的范例中,您要在 Form 中加入一个 Label、二个 CommandButton 及一个 Timer,不更改任何属性。 '在声明区中加入以下声明: Private Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long '加入以下程序码: Private Sub Command1_Click() Private Sub Command2_Click() Private Sub Form_Load() Private Sub Timer1_Timer() |
|
![]() ![]() |