Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Controls At Runtime
Message
From
16/04/2002 12:15:47
 
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00645508
Message ID:
00645539
Views:
14
Oops, I'm sorry. Change declaration:
'Wrong!!!
Dim WithEvents ctlNewControl as VBControlExtender

to:

!OK
Dim WithEvents ctlNewControl as CommandButton

You will have the same events like with normal commant button.

Code with VBControlExtender you can use with non-intrinsict controls (i.e. ActiveX controls).

I'm not sure you can organize dynamically added controls in control arrays. I think best way is to handle every command button separate.

Plamen Ivanov
MCSD .NET Early Achiever and MCAD .NET Charter Member (VB .NET/SQL Server 2000)
MCSD (VB 6.0/SQL Server 2000)

VB (.NET) - what other language do you need in the whole Universe?...

Previous
Reply
Map
View

Click here to load this message in the networking platform