# TextFrame.Activate Method

> Activates the text frame. The text frame receives the input focus. A text frame can only be activated, if the text part that contains the text frame has the input focus.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 13.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > TextFrame.Activate Method
- **449 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframe/activate-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframe/activate-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframe/activate-method/llms-full.txt

---

### Description

Activates the text frame. The text frame receives the input focus. A text frame can only be activated, if the text part that contains the text frame has the input focus.

### Syntax

```csharp
public bool Activate();
```

```vbnet
Public Function Activate() As Boolean
```

### Return Value

The return value is true, if the text frame could be activated. Otherwise it is false.

### Examples

The following example applies bold formatting through the text frame's selection by using `TextFrame.Activate`.

```csharp
Selection formattedSelection = textFrame.Selection;
formattedSelection.Bold = true;
textFrame.Selection = formattedSelection;

if (textFrame.Activate())
{
    Console.WriteLine("Activate completed successfully.");
}
```

```vbnet
Dim formattedSelection As Selection = textFrame.Selection
formattedSelection.Bold = True
textFrame.Selection = formattedSelection

If textFrame.Activate() Then
    Console.WriteLine("Activate completed successfully.")
End If
```

---

## Nearby

- **Previous:** [TextFrame Class](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframe/llms-full.txt)
- **Next:** [TextFrame.ApplicationFields Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframe/applicationfields-property/llms-full.txt)
