HOW TO:建立畫筆
這個範例會建立 Pen 物件。
範例
Dim myPen As System.Drawing.Pen
myPen = New System.Drawing.Pen(System.Drawing.Color.Tomato)
System.Drawing.Pen myPen;
myPen = new System.Drawing.Pen(System.Drawing.Color.Tomato);
System::Drawing::Pen^ myPen;
myPen = gcnew System::Drawing::Pen(System::Drawing::Color::Tomato);
穩固程式設計
在結束使用消耗系統資源的物件後 (例如 Pen 物件),您應一律呼叫物件的 Dispose。