Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/miguelhp373/messagebox_sample


https://github.com/miguelhp373/messagebox_sample

delphi messagebox

Last synced: about 4 hours ago
JSON representation

Awesome Lists containing this project

README

        

# :envelope: Message Box Sample





***
### 📝[information taken from the website "functionx" ](https://www.functionx.com/delphi/msgboxes/messagebox.htm)

## Flag List



```txt

MB_OK
MB_OKCANCEL
MB_ABORTRETRYIGNORE
MB_YESNOCANCEL
MB_YESNO
MB_RETRYCANCEL
MB_HELP
```
## Icon List



```txt

MB_ICONEXCLAMATION //Alert
MB_ICONWARNING //Alert
MB_ICONINFORMATION //Info
MB_ICONASTERISK //Info
MB_ICONQUESTION //Question
MB_ICONSTOP //Question
MB_ICONERROR //Error
MB_ICONHAND //Error
```

## Default Button on MessageBox



```txt

MB_DEFBUTTON1 //first button
MB_DEFBUTTON2 //second button
MB_DEFBUTTON3 //third button
MB_DEFBUTTON4 //fourth button
```

## The Returned Value of the Message Box



```txt

IDOK //Ok Button
IDCANCEL //Cancel Button
IDABORT //Abort Button
IDRETRY //Retry Button
IDIGNORE //Ignore Button
IDYES //Yes Button
IDNO //No Button
```

## Sample Use

```pascal
if Application.MessageBox('Message Text','Caption',MB_YESNOCANCEL or MB_ICONEXCLAMATION or MB_DEFBUTTON1) = IDYES then
begin
ShowMessage('You Clicked "Yes Button"!');
end;
```