---
title: "Panel Control in VB.Net"  
description: "The Panel control is a container of other controls. The Panel control is displayed by default without any borders at run time.  How to use Panel contr"  
author: "Pushpendra Singh"  
published: 2010-12-11  
updated: 2020-04-26  
canonical: https://www.mindstick.com/articles/311/panel-control-in-vb-dot-net  
category: "vb.net"  
tags: ["vb.net"]  
reading_time: 2 minutes  

---

# Panel Control in VB.Net

The [Panel control](https://www.mindstick.com/articles/400/panel-control-in-c-sharp-dot-net) is a [container](https://www.mindstick.com/forum/34127/extjs-how-to-set-border-for-the-container) of other controls. The Panel control is displayed by default without any borders at run time.\

## How to use Panel control

[Drag and drop](https://www.mindstick.com/forum/454/how-to-drag-and-drop-multiple-image-from-one-canvas-to-onther-canvas-in-html5) Panel control from toolbox on the [window Form](https://www.mindstick.com/forum/527/how-to-pass-datagridview-s-cells-value-to-another-window-form).

![Panel Control in VB.Net](https://www.mindstick.com/mindstickarticle/561eedef-170f-4ccc-98bb-efa4ee97ccdf/images/a5f95dfc-b51f-48e6-b729-8e1138776df6.png)

Collection of control can be placed in side Panel.

![Panel Control in VB.Net](https://www.mindstick.com/mindstickarticle/561eedef-170f-4ccc-98bb-efa4ee97ccdf/images/7d2f4bb0-fa65-47d5-984f-707688bd27d4.png)

**[Transparent](https://answers.mindstick.com/qa/92940/which-platform-launched-for-transparent-taxation-in-2020-india) Panel**

First set BackColor of Panel suppose you set green then set Form's TransparencyKey [property](https://www.mindstick.com/articles/198559/an-ownership-of-property-in-hua-hin) to the same color as Panel's [background color](https://www.mindstick.com/forum/18/split-background-color) –red in this case.

```
Private Sub Form25_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         'change back color of Panel         Panel1.BackColor = Color.Red         'set Form's TransparencyKey to the same color as Panel's back color         Me.TransparencyKey = Color.Red         'Me keyword provide a way to refer to the current instance of class, that is,the instance in which code is running  End Sub
```

Now when you run the [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) then panel will be transparent.

![Panel Control in VB.Net](https://www.mindstick.com/mindstickarticle/561eedef-170f-4ccc-98bb-efa4ee97ccdf/images/0898b7ed-191a-4e1a-b86d-b20befefa3a3.png)

## Panel properties

**BackColor:** Panel BackColor can be changed through BackColor property.

```
  Private Sub Form25_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         'change panel backcolor         Panel1.BackColor = Color.BlanchedAlmond   End Sub
```

![Panel Control in VB.Net](https://www.mindstick.com/mindstickarticle/561eedef-170f-4ccc-98bb-efa4ee97ccdf/images/b27bc202-cf28-42c3-b0da-7e4fafb6ea5e.png)

**BorderStyle:** Get or set BorderStyle of Panel.

```
Private Sub Form25_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         'set BorderStyle of panel         Panel1.BorderStyle = BorderStyle.FixedSingleEnd Sub
```

![Panel Control in VB.Net](https://www.mindstick.com/mindstickarticle/561eedef-170f-4ccc-98bb-efa4ee97ccdf/images/4527deea-6b18-4bea-ba8b-bd201eb93822.png)

**Visible:** You can hide all control inside panel through visible property of Panel. If you want to hide then set visible to false.

```
 Private Sub Form25_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         'hide panel         Panel1.Visible = False End Sub
```

Now when applications run then Panel will not be show.

![Panel Control in VB.Net](https://www.mindstick.com/mindstickarticle/561eedef-170f-4ccc-98bb-efa4ee97ccdf/images/43afb933-c3b9-4f75-ad30-26ec0d1cd95f.png)

---

Original Source: https://www.mindstick.com/articles/311/panel-control-in-vb-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
