# FrameCollection.Remove Method

> Removes a frame (image, text frame, chart, barcode or drawing) from a document.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 18.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 > FrameCollection.Remove Method
- **667 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/framecollection/remove-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/framecollection/remove-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/framecollection/remove-method/llms-full.txt

---

### Description

Removes a frame (image, text frame, chart, barcode or drawing) from a document.

### Syntax

```csharp
public bool Remove(FrameBase frame);
```

```vbnet
Public Function Remove(frame As FrameBase) As Boolean
```

### Parameters

| Parameter | Description |
|---|---|
| frame | Specifies the image, text frame, chart, barcode or drawing to remove. |

### Return Value

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

### Examples

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

```csharp
FrameCollection frameCollection = textControl.Frames;
TextFrame callout = new(new System.Drawing.Size(3000, 1200)) { Name = "Callout" };
textControl.TextFrames.Add(callout, TextFrameInsertionMode.DisplaceText);

if (frameCollection.Remove(new TXTextControl.Image()))
{
    Console.WriteLine("Remove completed successfully.");
}
```

```vbnet
Dim frameCollection As FrameCollection = textControl.Frames
Dim callout As New TextFrame(New System.Drawing.Size(3000, 1200)) With { .Name = "Callout" }
textControl.TextFrames.Add(callout, TextFrameInsertionMode.DisplaceText)

If frameCollection.Remove(New TXTextControl.Image()) Then
    Console.WriteLine("Remove completed successfully.")
End If
```

---

## Nearby

- **Previous:** [FrameCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/framecollection/getitem-method/llms-full.txt)
- **Next:** [FrameEventArgs Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/frameeventargs/llms-full.txt)
