1. 程式人生 > WINDOWS開發 >winform中訊息提示框延時自動關閉

winform中訊息提示框延時自動關閉

[DllImport("user32.dll")]
public static extern int MessageBoxTimeoutA(IntPtr hWnd,string msg,string Caps,int type,int Id,int time);//引用DLL
//MessageBoxTimeoutA((IntPtr )0,"3秒後自動關閉","訊息框",3000);// 直接呼叫 3秒後自動關閉 父視窗控制代碼沒有直接用0代替