# FrameBase.ChangeZOrder Method

> Changes the frame's z-order.

- **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 > FrameBase.ChangeZOrder Method
- **643 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/framebase/changezorder-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/framebase/changezorder-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/framebase/changezorder-method/llms-full.txt

---

### Description

Changes the frame's z-order.

### Syntax

```csharp
public bool ChangeZOrder(ZOrder zOrder);
```

```vbnet
Public Function ChangeZOrder(zOrder As ZOrder) As Boolean
```

### Parameters

| Parameter | Description |
|---|---|
| zOrder | Specifies how the z-order is changed. It can be a value of the [ZOrder](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/zorder/enumeration/llms-full.txt) enumeration. |

### Return Value

The return value is true, if the z-order could be changed. Otherwise, it is false.

### Examples

The following example adds a callout frame and works with it through the common frame API by using `FrameBase.ChangeZOrder`.

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

if (frameBase.ChangeZOrder(ZOrder.Up))
{
    Console.WriteLine("Change ZOrder completed successfully.");
}
```

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

If frameBase.ChangeZOrder(ZOrder.Up) Then
    Console.WriteLine("Change ZOrder completed successfully.")
End If
```

---

## Nearby

- **Previous:** [FrameBase.Bounds Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/framebase/bounds-property/llms-full.txt)
- **Next:** [FrameBase.DescriptiveText Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/framebase/descriptivetext-property/llms-full.txt)
