message class : OKCancel(string) method

Description

Displays a message dialog with the OK and Cancel button.

Syntax

instance.OKCancel(string mes)

Arguments

ClassNameDescription
stringmesMessage.

Return value

ClassDescription
intA value that indicates the type of button pressed.

Sample code

1:

message m = new message();

2:

int result = m.OKCancel("message");

Notes

The dialog box is modal. Blocks other actions in the application until the dialog is closed.


If the Ok button is pressed, 1 is returned.

If the Cancel button is pressed, 2 is returned.

If the dialog is closed without pressing the button, 2 is returned.

Links for reference

None.

Copyright © Cooker All rights reserved.