Share mdi in vb.net,

whitefish757

New member
#MDI trong VB.NET #vb.net #Giao diện Multi-Document #Windows Forms #User Giao diện

** mdi trong vb.net **

Giao diện nhiều tài liệu (MDI) là một loại giao diện người dùng cho phép mở nhiều cửa sổ trong một cửa sổ cha.Điều này có thể hữu ích cho các ứng dụng cần hiển thị nhiều tài liệu cùng một lúc, chẳng hạn như trình xử lý văn bản hoặc trình chỉnh sửa đồ họa.

Trong vb.net, bạn có thể tạo một ứng dụng MDI bằng cách sử dụng lớp `mdiform`.Lớp `mdiform` kế thừa từ lớp` form` và nó cung cấp một số tính năng bổ sung dành riêng cho các ứng dụng MDI.

Để tạo một ứng dụng MDI, trước tiên bạn cần tạo một đối tượng `mdiform`.Bạn có thể làm điều này bằng cách sử dụng mã sau:

`` `VBNet
Dim mdiform dưới dạng mdiform mới ()
`` `

Khi bạn đã tạo một đối tượng `mdiform`, bạn có thể bắt đầu thêm cửa sổ con vào nó.Bạn có thể làm điều này bằng cách sử dụng phương thức `add`.Phương thức `add` lấy đối tượng` form` làm tham số của nó.

`` `VBNet
mdiform.add (trẻ em)
`` `

Khi bạn thêm một cửa sổ trẻ em vào `mdiform`, cửa sổ con sẽ được hiển thị trong` mdiform`.Cửa sổ con cũng sẽ được tự động giảm thiểu khi nó không phải là cửa sổ hoạt động.

Bạn có thể điều khiển cửa sổ hoạt động trong một `mdiform` bằng cách sử dụng thuộc tính` activemdichild`.Thuộc tính `activemdichild` trả về một tham chiếu đến cửa sổ con hiện đang hoạt động.

`` `VBNet
Dim Activemdichild As Form = mdiform.ActiveMdichild
`` `

Bạn cũng có thể kích hoạt cửa sổ con bằng cách sử dụng phương thức `activate`.Phương thức `Activate` lấy đối tượng` form` làm tham số của nó.

`` `VBNet
mdiform.activate (con)
`` `

Để biết thêm thông tin về việc tạo các ứng dụng MDI trong VB.NET, bạn có thể tham khảo các tài nguyên sau:

* [MSDN: Mẫu MDI] (https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.mdiform)
* [Stack Overflow: MDI Forms trong VB.Net] (SQL statement with LIKE)

** Hashtags: **

* #MDI trong vb.net
* #vb.net
* #Giao diện đa tài liệu
* #Windows Forms
* #Giao diện người dùng
=======================================
#MDI in VB.NET #vb.net #Multi-Document Interface #Windows Forms #User Interface

**MDI in VB.NET**

The Multiple Document Interface (MDI) is a type of user interface that allows multiple windows to be opened within a single parent window. This can be useful for applications that need to display multiple documents at the same time, such as a word processor or a graphics editor.

In VB.NET, you can create an MDI application by using the `MdiForm` class. The `MdiForm` class inherits from the `Form` class, and it provides a number of additional features that are specific to MDI applications.

To create an MDI application, you first need to create an `MdiForm` object. You can do this by using the following code:

```vbnet
Dim mdiForm As New MdiForm()
```

Once you have created an `MdiForm` object, you can start adding child windows to it. You can do this by using the `Add` method. The `Add` method takes a `Form` object as its parameter.

```vbnet
mdiForm.Add(childForm)
```

When you add a child window to an `MdiForm`, the child window will be displayed within the `MdiForm`. The child window will also be automatically minimized when it is not the active window.

You can control the active window in an `MdiForm` by using the `ActiveMdiChild` property. The `ActiveMdiChild` property returns a reference to the currently active child window.

```vbnet
Dim activeMdiChild As Form = mdiForm.ActiveMdiChild
```

You can also activate a child window by using the `Activate` method. The `Activate` method takes a `Form` object as its parameter.

```vbnet
mdiForm.Activate(childForm)
```

For more information on creating MDI applications in VB.NET, you can refer to the following resources:

* [MSDN: MDI Forms](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.mdiform)
* [Stack Overflow: MDI Forms in VB.NET](https://stackoverflow.com/questions/1274054/mdi-forms-in-vb-net)

**Hashtags:**

* #MDI in VB.NET
* #vb.net
* #Multi-Document Interface
* #Windows Forms
* #User Interface
 
Join Telegram ToolsKiemTrieuDoGroup
Back
Top