BackColor屬性
套用至
Form、Button、Label、TextBox、RadioButton、CheckBox、ListBox、ComboBox、PictureBox、GroupBox、LED、ProgressBar、TrackBar、StatusBar
描述
取得或設定表單或控制項的背景色彩。
使用方式
GGet Form.Control.BackColor, var
GSet Form.Control.BackColor, value
- Form
- 指定表單名稱或含表單名稱的字串變數。
- Control
- 指定控制項名稱或含控制項名稱的字串。
- var
- 指定取得屬性值的字串變數。
- value
- 指定屬性中設定的字串運算式。
數值
要為表單或控制項背景色彩使用的色彩名稱。
預設值:
- Control (Form, Button, Label, RadioButton, CheckBox, PictureBox, GroupBox, LED)
- Window (TextBox, ListBox, ComboBox)
另請參閱
BackColorMode、Form、Button、Label、TextBox、RadioButton、Checkbox、ListBox、ComboBox、PictureBox、GroupBox、LED、ProgressBar、TrackBar、StatusBar
範例
GSet frmMain.lblStatus.BackColor, "Red"
← B BackColorMode屬性 →