Dialog.GetIcon
--------------

Returns the icon displayed in the dialog.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Dialog](component_Dialog.md) | [4.1](newinversion41.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Dialog.GetIcon" { ; ImageType; FileName } ) 

**MBS**( **"Dialog.GetIcon";** /\* Returns the icon displayed in the dialog. \*/  
**$ImageType**; /\* Optional; The type of image to return.   
Either JPEG, PNG, GIF or BMP. Default is JPEG.  
Ignored on Windows: Always returns PNG.e.g. "JPEG" \*/   
**$FileName**) /\* Optional; The filename to use for the picture.   
Default is "image" with the extension matching the image type.e.g. "test.jpg" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| ImageType | The type of image to return.    Either JPEG, PNG, GIF or BMP. Default is JPEG.   Ignored on Windows: Always returns PNG. | "JPEG" | Optional |
| FileName | The filename to use for the picture.    Default is "image" with the extension matching the image type. | "test.jpg" | Optional |

### Result

Returns image or error.

### Description

Returns the icon displayed in the dialog.  
The default image is the application icon (NSApplicationIcon application property).  
### See also

- [Dialog.GetButton](DialogGetButton.md)
- [Dialog.GetLeft](DialogGetLeft.md)
- [Dialog.GetMode](DialogGetMode.md)
- [Dialog.GetTop](DialogGetTop.md)
- [Dialog.SetIcon](DialogSetIcon.md)

This function is free to use.

Created 18th August 2014 , last changed 29th September 2020

  
[Dialog.GetFieldText](DialogGetFieldText.md) - [Dialog.GetInformativeText](DialogGetInformativeText.md)

[HTML Version](DialogGetIcon.shtml)