我有個小問題...VB在程式碼裡改變物件的屬性時...如果物件數量很多的話...有比較"簡潔"的方式嗎(如用陣列、迴圈的方式等)?下面是我其中的一段程式碼(真的是又臭又長...很難過說)...
Case "bulk"
Frame1.Enabled = True
Label2.Enabled = True
Label4.Enabled = True
Option1.Enabled = True
Option2.Enabled = True
Option3.Enabled = True
Label14.Enabled = True
Label02.Enabled = True
Label01.Enabled = True
Label13.Enabled = True
Combo1.Enabled = True
Combo2.Enabled = True
Case "tanker"
Frame2.Enabled = True
Label3.Enabled = True
Label5.Enabled = True
Option4.Enabled = True
Option5.Enabled = True
Option6.Enabled = True
Label18.Enabled = True
Label16.Enabled = True
Label46.Enabled = True
Label17.Enabled = True
Combo3.Enabled = True
Combo4.Enabled = True
Case "rocargo"
Frame13.Enabled = True
Label30.Enabled = True
Label10.Enabled = True
Option19.Enabled = True
Option20.Enabled = True
Option21.Enabled = True
Label29.Enabled = True
Label27.Enabled = True
Label28.Enabled = True
Label15.Enabled = True
Combo13.Enabled = True
Combo14.Enabled = True