Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Controls At Runtime
Message
 
To
16/04/2002 17:13:51
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00645508
Message ID:
00645731
Views:
25
Ok, thanks

What if I used a collection? Is it possible to add events
to objects in a collection?


Private oButtons As New Collection

Public Sub AddButton()

  Dim oNewButton As Object

  iTotButtons = oButtons.Count + 1

  sName = "Test" & iTotButtons
  Set oNewButton = Me.Controls.Add("VB.CommandButton", sName)

  oButtons.Add oNewButton

  With oNewButton
    .Caption = sName
    .Top = 1000 * iTotButtons
    .Left = 1000
    .Visible = True
  End With

End Sub
<>/font
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform