Share vb.net unload form

datdungvo

New member
### Cách dỡ bỏ biểu mẫu trong vb.net

Các biểu mẫu là các khối xây dựng cơ bản của giao diện người dùng trong vb.net.Chúng có thể được sử dụng để hiển thị thông tin, thu thập đầu vào của người dùng và xử lý các sự kiện.Khi bạn không còn cần một biểu mẫu, bạn có thể dỡ nó để giải phóng tài nguyên và cải thiện hiệu suất.

Để dỡ bỏ một biểu mẫu trong vb.net, bạn có thể sử dụng phương thức ** dỡ hàng **.Phương thức ** demoad ** có hai quá tải:

*** ELOAD (tôi) **: Quá tải này sẽ dỡ mẫu có chứa mã gọi phương thức.
*** unload (formName) **: Quá tải này dỡ mẫu có tên có tên được chỉ định.

Ví dụ: mã sau sẽ dỡ mẫu có chứa mã gọi phương thức:

`` `VBNet
Me.unload ()
`` `

Mã sau sẽ dỡ mẫu có tên là "MyForm":

`` `VBNet
Dỡ myform
`` `

** Lưu ý: ** Khi bạn dỡ một biểu mẫu, nó không bị phá hủy.Nó chỉ đơn giản là ẩn khỏi người dùng.Nếu bạn cần phá hủy một biểu mẫu, bạn có thể sử dụng phương thức ** Dispose **.

### Bài viết tham khảo

* [Cách dỡ bỏ biểu mẫu trong vb.net] (https://www.tutorialspoint.com/vbnet/vbnet_unload_form.htm)
* [Phương thức dỡ hàng (vb.net)] (https://docs.microsoft.com/en-us/dotnet/api/system.windows.form.form.unload?view=Net-6.0)

### hashtags

* #vb.net
* #Hình thức
* #Unload
* #giao diện người dùng
* #hiệu suất
=======================================
### How to Unload a Form in VB.NET

Forms are the basic building blocks of user interfaces in VB.NET. They can be used to display information, collect user input, and handle events. When you no longer need a form, you can unload it to free up resources and improve performance.

To unload a form in VB.NET, you can use the **Unload** method. The **Unload** method has two overloads:

* **Unload(Me)**: This overload unloads the form that contains the code that calls the method.
* **Unload(FormName)**: This overload unloads the form that has the specified name.

For example, the following code unloads the form that contains the code that calls the method:

```vbnet
Me.Unload()
```

The following code unloads the form named "MyForm":

```vbnet
Unload MyForm
```

**Note:** When you unload a form, it is not destroyed. It is simply hidden from the user. If you need to destroy a form, you can use the **Dispose** method.

### Reference Articles

* [How to Unload a Form in VB.NET](https://www.tutorialspoint.com/vbnet/vbnet_unload_form.htm)
* [Unload Method (VB.NET)](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.form.unload?view=net-6.0)

### Hashtags

* #vb.net
* #form
* #Unload
* #User interface
* #Performance
 
Join Telegram ToolsKiemTrieuDoGroup
Back
Top