ErrorBox(Message: String; [ParentWindow: IWin32Window = Null]);
ErrorBox(Message: String; ParentWindow: Prognoz.Platform.Interop.Forms.IWin32Window);
Message. The message to be displayed in the error box.
ParentWindow. The parent window, for which the dialog box opens modally. The Null value is passed by default, the dialog box opens modally for the current window.
The ErrorBox method opens a standard error message dialog box.
The dialog box contains only the OK button and looks as follows:
Executing the example requires a form and a button named Button1 on the form.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
WinApplication.ErrorBox("Critical error");
End Sub Button1OnClick;
Clicking the button opens the error message dialog box.
Executing the example requires a .NET form and a button on the form.
Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Ui;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
WinAppCls: WinApplicationClass = New WinApplicationClassClass();
Begin
WinAppCls.ErrorBox("Critical error", New IWin32WindowForeAdapter(Self));
End Sub;
Clicking the button opens the error message dialog box.
See also: