摘要:
代码如下:主要功能是在FORM上动态添加一个或多个控件。 1 Option Explicit 2 Dim oCtrl As Object 3 '使得控件可以响应事件 4 Dim WithEvents MyBtn As CommandButton 5 Private Sub Form_Load() 6 Dim i As Integer 7 '先在窗体上加载个Label1(0)的标签控件 8 For i = 1 To 3 9 Load Me.Label1(i)10 Label1(i).Top = Label1(i - 1).Top + 2 * Lab... 阅读全文