Share Hướng Dẫn Mở Form Mới Trong VB.NET

trancattong

New member
## Hướng dẫn mở biểu mẫu mới trong vb.net

1. Tạo một dự án Windows Forms mới trong Visual Studio.
2. Trong hộp công cụ ** **, kéo và thả mẫu ** ** vào ** Trình thiết kế mẫu **.
3. Nhấp đúp vào mẫu ** ** để mở ** Trình thiết kế mẫu **.
4. Trong cửa sổ ** thuộc tính **, đặt thuộc tính ** tên ** của mẫu ** ** thành ** form1 **.
5. Trong bộ chỉnh sửa mã ** **, thêm mã sau vào ** form1_load ** Trình xử lý sự kiện:

`` `
Sub Form1_Load (người gửi dưới dạng đối tượng, e là EventArgs) xử lý mybase.load
'Tạo một biểu mẫu mới.
Dim Newform dưới dạng Mẫu2 mới

'Hiển thị hình thức mới.
newform.show ()
Kết thúc phụ
`` `

6. Chạy dự án.Hình thức mới sẽ được hiển thị.

## hashtags

* #vb.net
* #các hình thức
* #Windows Forms
* #Hình thức mới
* Mẫu #open
=======================================
## Instructions to open a new form in VB.NET

1. Create a new Windows Forms project in Visual Studio.
2. In the **Toolbox**, drag and drop a **Form** onto the **Form Designer**.
3. Double-click the **Form** to open the **Form Designer**.
4. In the **Properties** window, set the **Name** property of the **Form** to **Form1**.
5. In the **Code Editor**, add the following code to the **Form1_Load** event handler:

```
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' Create a new form.
Dim newForm As New Form2

' Show the new form.
newForm.Show()
End Sub
```

6. Run the project. The new form will be displayed.

## Hashtags

* #vb.net
* #Forms
* #Windows Forms
* #New Form
* #open Form
 
Join Telegram ToolsKiemTrieuDoGroup
Back
Top