---
id: "P:cAlgo.API.Window.IsActive"
kind: "property"
type: "T:cAlgo.API.Window"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/IsActive/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Window.IsActive

Member of [Window](https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/index.md).

## IsActive

Get / Set the window active / de-active flag, if Yes then the window will be active

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.
- Cloud: Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.

C#:

```csharp
public bool IsActive {get;}
```

Python:

```python
window.IsActive: bool
```

### Returns

`bool` — 

### Examples

C#:

```csharp
var window = new Window { Title = "Status", Width = 250, Height = 120 };
window.Activated += args => Print("Active: {0}", args.Window.IsActive);
window.Show();
Print("Is active: {0}", window.IsActive);
```

Python:

```python
window = Window()
window.Title = "Status"
window.Width = 250
window.Height = 120
window.Activated += lambda args: api.Print(f"Active: {args.Window.IsActive}")
window.Show()
api.Print(f"Is active: {window.IsActive}")
```

