Easy to Create, Easy to Change - Easy to use!

Function::CDF

Message



Parameters


Returns/Result


Examples


Reference

REFERENCE FOR MSGBOX.DLL

DISCLAIMER:

This CDF is provided for illustration purposes only of the uses for a Custom Defined Function within DataEase for Windows. This

CDF is provided 'As is' with no warranty whatsoever, either expressed or implied. DataEase International, Inc. does not

warrant the CDF to be error free, nor does it warrant the CDF to meet your specific requirements. In addition, this CDF is not

approved for use, nor is it subject to Technical Support by DataEase International, Inc.

FUNCTION:

MESSAGE ( Message Text , Caption Text , Icon , Buttons , Beep )

PURPOSE:

Displays a custom Windows message box allowing the application developer to specify a custom message, message box title, a message

icon, various button combinations for dispatching the dialog and an audible beep. This function can be used alone or in conjunction with

other DataEase for Windows functions. The function returns an integer value corresponding to the Users response in dispatching the dialog.

PASSING ARGUMENTS:

1. Message Text: a text message the application developer wishes to display.

2. Caption Text: a 50 character string used as the title for the message dialog.

3. Icon: an integer value that specifies what type of icon to display in

the message box.

1 Information Icon ( i )

2 Exclamation Icon ( ! )

3 Stop ( Stop sign )

4 Question ( ? )

5 No icon

4. Buttons:

an integer value that specifies what combination of buttons to

be displayed in the message dialog for the user to use in

dispatching the dialog and sending return values back to the

function.

0 (default) OK

1 OK CANCEL

2 RETRY CANCEL

3 ABORT RETRY CANCEL

4 YES NO

5 YES NO CANCEL

5. Beep:

an integer values that specifies what type of audible beep to

generate according to a given system alert level. The sound for

each alert level is determined by an entry in the [sounds]

section of WIN.INI.

0 or 1 (default) no sound

2 System sound

3 Information sound

4 Exclamation sound

5 Stop sound

6 Question sound

7 OK sound

RETURN VALUES:

Each message dialog you display will include at least one push button

for the user to dispatch the dialog. When a button is pressed, the

Message function returns an integer value indicating that it received

a user response and DataEase will continue processing. The following

return values correspond to the available buttons for display:

1 ABORT

2 CANCEL

3 IGNORE

4 NO

5 OK

6 RETRY

7 YES

0 Out of Memory

TIP:

Since the function returns an integer value, it may be awkward when

using Message in field derivations. The following example

illustrates one way to use Message:

SCENARIO:

We have a form with a date field called DEPARTURE DATE, and we

want to display a message when the user enters a date that is

prior to today's date (e.g. it's difficult to leave when you

already have). However, if the user enters a date after Today's

date, we want to display a message that indicates on what day of

the week that date occurs.

Field: DEPARTURE DATE

Derivation Formula:

if ( DEPARTURE DATE < current date ,

if ( Message

( jointext ( "The date you entered: " ,

jointext ( DEPARTURE DATE , " is invalid. \n\t

Do you want today's date?" )

) ,

"Invalid Date Message" , 4, 4, 6 ) = 7 ,

if ( Message

( jointext ( "Your entry date will be replaced with

today's date: " , current date ) ,

"Enter Current Date", 1, 0, 3 ) = 5, current date ,

current date ) ,

if ( Message

("Your entry will be discarded and the field will be

left blank." ,

"Discard Entry Date" , 2, 6, 4 ) = 5 , blank, blank )

) ,

if ( Message

( jointext ( "The date you entered: " ,

jointext ( DEPARTURE DATE,

jointext ( " is a " ,

spellweekday ( weekday ( DEPARTURE DATE ) ) ) ) )

"Day of the Week", 4, 4, 6 ) = 5 ,

DEPARTURE DATE , DEPARTURE DATE ))

NOTE: the symbols /n/t on line 4 tell Windows to display a

<newline> and <tab>.

FUNCTION:

BEEP ( Beep )

PURPOSE:

Generates an audible sound from the PC's speaker.

PASSING ARGUMENTS:

1. Beep:

an integer values that specifies what type of audible beep to

generate according to a given system alert level. The sound for

each alert level is determined by an entry in the [sounds]

section of WIN.INI.

0 or 1 (default) no sound

2 System sound

3 Information sound

4 Exclamation sound

5 Stop sound

6 Question sound

7 OK sound

RETURN VALUE:

The return value means nothing and can be discarded or ignored.

INSTALLATION OF MSGBOX.DLL AS A DataEase for Windows CDF:

Open the application within which you wish to integrate the function.

From the Menu Bar, select APPLICATION - CUSTOM FUNCTIONS. Fill in the

form as shown below and press F2 for each function (both functions are

contained in the same DLL).

Function Name: MESSAGE

OS Type: WINDOWS

Description: DISPLAYS CUSTOM MESSAGE BOX

CDF Library Name: MSGBOX.DLL

Return Type: INT

DOS Mem Req't:

DOS Entry Point:

Parm 1 Name: TEXT MESSAGE

Parm 1 Type: STRING

Parm 2 Name: CAPTION TITLE

Parm 2 Type: STRING

Parm 3 Name: ICON DISPLAY

Parm 3 Type: INT

Parm 4 Name: BUTTON SELECTION

Parm 4 Type: INT

Parm 5 Name: BEEP SOUND

Parm 5 Type: INT

Parm 6 Name:

Parm 6 Type:

Parm 7 Name:

Parm 7 Type:

Parm 8 Name:

Parm 8 Type:

Parm 9 Name:

Parm 9 Type:

Parm 10 Name:

Parm 10 Type:

Function Name: BEEP

OS Type: WINDOWS

Description: MAKES AN AUDIBLE BEEP

CDF Library Name: MSGBOX.DLL

Return Type: INT

DOS Mem Req't:

DOS Entry Point:

Parm 1 Name: BEEP SELECTION

Parm 1 Type: INT

Parm 2 Name:

Parm 2 Type:

Parm 3 Name:

Parm 3 Type:

Parm 4 Name:

Parm 4 Type:

Parm 5 Name:

Parm 5 Type:

Parm 6 Name:

Parm 6 Type:

Parm 7 Name:

Parm 7 Type:

Parm 8 Name:

Parm 8 Type:

Parm 9 Name:

Parm 9 Type:

Parm 10 Name:

Parm 10 Type:

See Also


On the forum about Message

[@EOF@]...

Product: . Written by alembagheri tahmas 07/12/13 at 13:37:32

Hi there,I am trying to use an external MySQL DB in dataease. I have successfully create the ODBC link and added the DB to dataease. I can also access the DB from dataease. Now, just for testing purposes, I am trying to create a simple report b...

Product: DataEase for Windows 7.x. Written by George Washington 11/04/14 at 08:26:17

no se pude exportar ahora archivos a pdf, ni a excel o otros cosa mala. en verdad creo que hace faltaen las versiones anteriores me funcionaba mas o menos bien.&nbsp;le hace falta a los aplicativos que se desarrollan en Dataeasegr...

Product: DataEase 8 Reporter. Written by eduardo paez 02/05/14 at 14:40:11

Thanks. Anyway I'm trying to use this fuction but it seems to me that it doesn't work on 8.2. I tried also in a DQL.There's something wrong?<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA9IAAAJ3CAYAAAB4NWk3AAAAAXNSR0IArs4...

Product: . Written by Marco Marchesi 15/02/16 at 14:50:46

[@EOF@]...

Product: Dataease [{8}]FIVE. Written by Chamil Rajindra 21/02/19 at 10:17:46

Thanks for the very good explanation!AS...

Product: . Written by afonso santos 28/10/19 at 00:50:14

I am pleased to see that the migration from Dos 4.53 is then sa 5.5 works. A really useful thing would be a compiler of SQL languages. Will you get there?Original Text:Mi compiaccio a vedere che la migrazione da Dos 4.53 รจ poi sa 5.5 funzio...

Product: . Written by Grossi Gioacchino 18/11/19 at 14:33:44

How can i delete a Style sheet?...

Product: Dataease [{8}]FIVE. Written by Rainer 22/03/21 at 11:13:10

I run W7 and since a few days&nbsp;Dataease 8.5 is not starting any more, do you have an idea? i installed it again but that did not help....

Product: Dataease [{8}]FIVE. Written by Rainer 08/06/21 at 14:12:40

[@EOF@]...

Product: . Written by Hiralal Rampul 01/12/21 at 17:47:10

On the blog about Message