Пример #1
0
        public static void Show(
            string text,
            string caption,
            Win32MessageBoxType type,
            DeferredInvokeHandler callback)
        {
            IntPtr winHandle = Application.Window.Handle;

            new Thread(args =>
            {
                int num = MessageBox(winHandle, text, caption, type);
                if (callback == null)
                {
                    return;
                }
                Application.DeferredInvoke(callback, num);
            }).Start();
        }
Пример #2
0
 private static extern int MessageBox(
     IntPtr hWnd,
     string text,
     string caption,
     Win32MessageBoxType type);