# DeviceScreen

Namespace: **Wisej.Hybrid**

Assembly: **Wisej.Hybrid** (3.5.0.0)

Provides methods for interacting with the device's screen, including taking screenshots and screen recording.

{% tabs %}
{% tab title="C#" %}

```csharp
public class DeviceScreen
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class DeviceScreen
```

{% endtab %}
{% endtabs %}

Access this class through the [Device](/hybrid/start/api/general/wisej.hybrid.device.md) singleton.

## Constructors

### ![](/files/CCV9PPenlC1YZvNh1I6R)DeviceScreen()

Initializes a new instance of [DeviceScreen](/hybrid/start/api/display/wisej.hybrid.devicescreen.md).

## Methods

### ![](/files/CCV9PPenlC1YZvNh1I6R)CapturePhoto()

Takes a screenshot of the device's screen.

**Returns:** [Image](https://docs.microsoft.com/dotnet/api/system.drawing.image). An Image representing the captured screenshot.

Note: There may be issues in Windows as documented here: <https://github.com/MicrosoftEdge/WebView2Feedback/issues/2799>

### ![](/files/CCV9PPenlC1YZvNh1I6R)StartRecording(microphone)

Starts recording the device's screen.

| Parameter                                       | Type                                                            | Description                                                 |
| ----------------------------------------------- | --------------------------------------------------------------- | ----------------------------------------------------------- |
| **microphone** ![](/files/hKoZkt511VItWvI9RDIT) | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | Indicates whether to include audio in the screen recording. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). True if screen recording started successfully; otherwise, false.

### ![](/files/CCV9PPenlC1YZvNh1I6R)StopRecording()

Stops recording the device's screen.

## Events

### ![](/files/CCV9PPenlC1YZvNh1I6R)Recording

[EventHandler\<MemoryStream>](https://docs.microsoft.com/dotnet/api/system.eventhandler-1) Occurs when a video stream from the device's screen is received.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/hybrid/start/api/display/wisej.hybrid.devicescreen.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
