Advertisement
2002ASP Miscellaneous #2281

A clean way to add control arrays at runtime!

This code, will add elements to a control array element at runtime. This is very easy to do, as a control array is actually a collection and gives us a count.

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
'Load an new instance of myControl 
'the index is the count, thus making it one
'greater than the prior index as index is 0 based
'and count starts at 1
Load pbVI(pbVI.Count)
'Count is now 1 greater so to address the control 
'you just created reference count -1
With pbVI(pbVI.Count - 1)
'.Left = 100
'.Top = 600
'.Visible = True
End With
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine