1
我有我的FlowLayoutPanel中添加了一些自定義的控制:更新以編程方式添加控件
Dim drive As New WindowsControlLibrary1.UserControl1()
drive.FileSystemlable = reader.GetString(2)
drive.AbalableSpaceLable = Convert.ToInt32(reader.GetString(4)/1024)
drive.TotalSpaceLable = Convert.ToInt32(reader.GetString(5)/1024)
drive.SetVolumeLable = reader.GetString(3)
Dim usedspace As Integer = Convert.ToInt32(reader.GetString(5)) - Convert.ToInt32(reader.GetString(4))
drive.BarValue = usedspace/1024
Form1.FlowLayoutPanel1.Controls.Add(drive)
如何我現在可以更新這些控件,而不是清除它們並重新加入他們呢?