public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon) { if (time == 0) { return(MessageBox.Show(text, caption, buttons, icon)); } else { return((DialogResult)MessageBoxTimeoutA(IntPtr.Zero, text, caption, buttons.GetHashCode() | icon.GetHashCode() | MessageBoxDefaultButton.Button1.GetHashCode(), 0, time)); } }