# TextFrameCollection.Remove Method

> Removes a text frame from a Text Control document.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 12.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.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 for Windows Forms > Reference > TXTextControl > TextFrameCollection.Remove Method
- **712 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframecollection/remove-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframecollection/remove-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframecollection/remove-method/llms-full.txt

---

### Description

Removes a text frame from a Text Control document.

### Syntax

```csharp
public bool Remove(TextFrame textFrame);
```

```vbnet
Public Function Remove(textFrame As TextFrame) As Boolean
```

### Parameters

| Parameter | Description |
|---|---|
| textFrame | Specifies the text frame to remove. |

### Return Value

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

### Examples

The following example works with text frames in the current document by using `TextFrameCollection.Remove`.

```csharp
TextFrameCollection textFrameCollection = textControl.TextFrames;
textFrameCollection.Add(new TextFrame(new System.Drawing.Size(3000, 1200)) { Name = "Callout", ID = 100 }, TextFrameInsertionMode.DisplaceText);

if (textFrameCollection.Remove(new TextFrame(new System.Drawing.Size(600, 400))))
{
    Console.WriteLine("Remove completed successfully.");
}
```

```vbnet
Dim textFrameCollection As TextFrameCollection = textControl.TextFrames
textFrameCollection.Add(New TextFrame(New System.Drawing.Size(3000, 1200)) With { .Name = "Callout", .ID = 100 }, TextFrameInsertionMode.DisplaceText)

If textFrameCollection.Remove(New TextFrame(New System.Drawing.Size(600, 400))) Then
    Console.WriteLine("Remove completed successfully.")
End If
```

---

## Nearby

- **Previous:** [TextFrameCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframecollection/getitem-method/llms-full.txt)
- **Next:** [TextFrameEventArgs Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframeeventargs/llms-full.txt)
