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秒后自动关闭","消息框",0,0,3000);// 直接调用 3秒后自动关闭 父窗口句柄没有直接用0代替

猜你喜欢

转载自www.cnblogs.com/dangpengfei/p/12766281.html