# umessage command

The umessage command sends a Windows-style message to the Client
 linked to the process executing the command. If the optional TO clause is used, the
 umessage command sends a Windows application launched by the
 uexecute command.

## Format

```

 UMESSAGE [TO var,] expr1, expr2, expr3
```

## Parameters

| var | Must be an identifier returned by the uexecute command |
| --- | --- |
| expr1 | Windows message number |
| expr2 | Numeric parameter |
| expr3 | String parameter |

## Description

If the TO clause is used, *var* must be an identifier returned by the
 uexecute command RETURNING clause.

 If the TO clause is not used, the message and parameters are sent to the process’s Client.

 The following table lists connection message numbers and definitions:

| Message Number | Definition |
| --- | --- |
| 1474 | Connect message |
| 1425 | Disconnect message |

## Example(s)

```
 *
 * Program will launch notepad, Sleep 2 seconds
 * then close the window.
 *
 UEXECUTE "NOTEPAD.EXE EXISTING.TXT" RETURNING HANDLE
 SLEEP 2
 UMESSAGE TO HANDLE,16,0,""
 *
 * Program will now display a message in bottom of
 * mvTERM Window.
 *
 UMESSAGE 1527,0,"Remember to Close your files..."
 *
```

## See also

- [O/S interoperability commands and functions](https://d3codex.com/pickbasic-flashbasic/os-interoperability-commands/)
- [uclose command](https://d3codex.com/pickbasic-flashbasic/uclose-command/)
- [ucreate command](https://d3codex.com/pickbasic-flashbasic/ucreate-command/)
- [udelete command](https://d3codex.com/pickbasic-flashbasic/udelete-command/)
- [uerror() function](https://d3codex.com/pickbasic-flashbasic/uerror-function/)
- [uexecute command](https://d3codex.com/pickbasic-flashbasic/uexecute-command/)
- [ulock command](https://d3codex.com/pickbasic-flashbasic/ulock-command/)
- [ulseek() function](https://d3codex.com/pickbasic-flashbasic/ulseek-function/)
- [uopen command](https://d3codex.com/pickbasic-flashbasic/uopen-command/)
- [uread command](https://d3codex.com/pickbasic-flashbasic/uread-command/)
- [ureadline() function](https://d3codex.com/pickbasic-flashbasic/ureadline-function/)
- [usystem() function](https://d3codex.com/pickbasic-flashbasic/usystem-function/)
- [uwaitfor command](https://d3codex.com/pickbasic-flashbasic/uwaitfor-command/)
- [uwrite command](https://d3codex.com/pickbasic-flashbasic/uwrite-command/)

---
Source: https://d3codex.com/pickbasic-flashbasic/umessage-command/ - part of the D3Codex reference.
