Window.SetZoomButton
--------------------

This function enables or disables the the Zoom Button on a window.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Window](component_Window.md) | [1.1](newinversion11.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Window.SetZoomButton"; WindowRef; On or Off ) 

**MBS**( **"Window.SetZoomButton";** /\* This function enables or disables the the Zoom Button on a window. \*/  
**$WindowRef**; /\* Window Reference is the unique OS level window ID. You can obtain this by using the [Window.FindByTitle](WindowFindByTitle.md) or [Window.FindByIndex](WindowFindByIndex.md) functions. Pass zero to access the frontmost window.e.g. 0 \*/   
**$On or Off**) /\* The new setting.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WindowRef | Window Reference is the unique OS level window ID. You can obtain this by using the [Window.FindByTitle](WindowFindByTitle.md) or [Window.FindByIndex](WindowFindByIndex.md) functions. Pass zero to access the frontmost window. | 0 |
| On or Off | The new setting. | 1 |

### Description

This function enables or disables the the Zoom Button on a window.  
### Examples

Set The Zoom button

 Let(  
\[  
windowRef = MBS ("[Window.FindByTitle](WindowFindByTitle.md)"; Get(WindowName))  
\];  
  
MBS (  
"Window.SetZoomButton";  
windowRef;  
0  
)  
  
)  
Set The Zoom button

 Let(  
\[  
windowRef = MBS ("[Window.FindByTitle](WindowFindByTitle.md)"; Get(WindowName))  
\];  
  
MBS (  
"Window.SetZoomButton";  
windowRef;  
1  
)  
)  
### See also

- [Window.FindByIndex](WindowFindByIndex.md)
- [Window.FindByTitle](WindowFindByTitle.md)
- [Window.HasZoomButton](WindowHasZoomButton.md)
- [Window.SetCloseButton](WindowSetCloseButton.md)

### Example Databases

- [Window/WindowEffects](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/WindowEffects.shtml#17ScriptAnchor_)

### Blog Entries

- [Customize your FileMaker solution](https://www.mbsplugins.de/archive/2021-04-25/Customize_your_FileMaker_solut/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 22nd January 2016

  
[Window.SetWindowDisplayAffinity](WindowSetWindowDisplayAffinity.md) - [Window.Show](WindowShow.md)

[HTML Version](WindowSetZoomButton.shtml)