# TextControl.DocumentToClient Method

> Computes coordinates in twips relative to the top-left corner of the document into client coordinates.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 25.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Windows.Forms.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > TextControl.DocumentToClient Method
- **613 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/documenttoclient-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/documenttoclient-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/documenttoclient-method/llms-full.txt

---

### Description

Computes coordinates in twips relative to the top-left corner of the document into client coordinates.

### Syntax

#### DocumentToClient(Point)

Computes the specified point in twips into client coordinates.

```csharp
public Point DocumentToClient(Point point);
```

```vbnet
Public Function DocumentToClient(point As Point) As Point
```

| Parameter | Description |
|---|---|
| point | Specifies a document point which client coordinates are computed. |

#### DocumentToClient(Rectangle)

Computes the specified rectangle in twips into client coordinates.

```csharp
public Rectangle DocumentToClient(Rectangle rectangle);
```

```vbnet
Public Function DocumentToClient(rectangle As Rectangle) As Rectangle
```

| Parameter | Description |
|---|---|
| rectangle | Specifies a document rectangle which client coordinates are computed. |

### Return Value

The return value specifies the computed client point or rectangle.

### Examples

The following example converts a document-coordinate point to client coordinates.

```csharp
var result = textControl.DocumentToClient(new System.Drawing.Point(20, 20));
Console.WriteLine($"Document To Client result: {result}");
```

```vbnet
Dim result = textControl.DocumentToClient(New System.Drawing.Point(20, 20))
Console.WriteLine($"Document To Client result: {result}")
```

---

## Nearby

- **Previous:** [TextControl.DocumentTargets Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/documenttargets-property/llms-full.txt)
- **Next:** [TextControl.DrawingActivated Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/drawingactivated-event/llms-full.txt)
