using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Management; // WMI 核心命名空間
| 組件 | 名稱 | 屬性設定 |
|---|---|---|
| TextBox | textBox1 | Text="" |
| TextBox | textBox2 | Text="" |
| TextBox | textBox3 | PasswordChar='*', Text="" |
| ListBox | listBox1 | 顯示硬碟資訊 |
| Label x3 | label1-3 | 提示:遠端電腦名/IP、擁有 WMI 權限帳號、密碼 |
| Button | button1 | Text="獲得硬碟資訊", FlatStyle=Flat |

圖 07:硬碟資訊查詢設計介面
下篇將撰寫 button1_Click 查詢邏輯。