BBjConstants

Description

In BBj 11.0 and higher, the BBjConstants object exposes constants related to miscellaneous BBj features.

Creation

BBjAPI > BBjConstants

The BBjRuntime may be obtained through the following BBjAPI object method:

Return Value

Method

BBjConstants

getConstants()

Methods of BBjConstants

None.

Remarks

None.

Constants

MSGBOX Buttons:

0

MB_OK

1

MB_OKCANCEL

2

MB_ABORTRETRYIGNORE

3

MB_YESNOCANCEL

4

MB_YESNO

5

MB_RETRYCANCEL

7

MB_CUSTOM

MSGBOX Icon:

16

MB_ICONSTOP

32

MB_ICONQUESTION

48

MB_ICONEXCLAMATION

64

MB_ICONINFORMATION

MSGBOX Default Button:

0

MB_DEFBUTTON1

256

MB_DEFBUTTON2

512

MB_DEFBUTTON3

65536

MB_DEFBUTTONNONE

MSGBOX Options:

32768

MB_RAWTEXT

MSGBOX Selection Constants

0

MB_SELECT_CLOSE

1

MB_SELECT_OK

2

MB_SELECT_CANCEL

3

MB_SELECT_ABORT

4

MB_SELECT_RETRY

5

MB_SELECT_IGNORE

6

MB_SELECT_YES

7

MB_SELECT_NO


Example

rem ' BBjConstants

c! = bbjapi().getConstants()

result = msgbox("OK to proceed?",c!.MB_YESNO+c!.MB_ICONQUESTION+c!.MB_DEFBUTTON2)
switch result
    case c!.MB_SELECT_YES
        print "User selected YES"
        break
    case c!.MB_SELECT_NO
        print "User selected NO"
        break
    case c!.MB_SELECT_CLOSE
        print "User hit ESCAPE or clicked the close box"
        break
    case default
        print "Unknown response",result
        break
swend
stop

See Also

BBjAPI

BBj Object Variables

BBj Object Creation and Assignment

BBj Object Error Handling

BBj Object Operators

MSGBOX() Function

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.