ActiveX Control Properties

When developing an ActiveX control, I want to create a property which can be set at design-time using a dropdown list (in the property list window).
The list should be made up from a recordset produced from a SQL statement such as "select ValidationName from ValidationTable", maybe from a stored procedure.

How do I do this and what 'type' must I set the property as?
kwlbAsked:
Who is Participating?
 
caraf_gConnect With a Mentor Commented:
The way around it, btw, is to use property pages and expose the properties only through them. And the way to do *that* is to make them Friends.
0
 
caraf_gCommented:
Don't think this is possible in VB. VB only supports static lists.
0
 
kwlbAuthor Commented:
Does VB not do something similar though when setting the datasource propetry of a bound control to the ADO sources on a form??
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
caraf_gCommented:
No. The controls may be VB controls, but they were not written using VB.... that's the difference.
0
 
mcriderCommented:
caraf_g is correct... There is no way to do this in VB. The property page is a good workaround.

The reason a VB program can't to this is because the box that shows up in the Properties window is really a textbox and when you add your ActiveX control to a form at development time, the control is actually in "run-time" even though you haven't run your program yet...

Since the control is in run-time, it can't set the MultiLine property of the property window (for example, like a listbox list property) because the MultiLine property can only be set at development time...


I know this is confusing, but that's the way it is...



Cheers!
0
 
kwlbAuthor Commented:
Thankyou very much.
0
All Courses

From novice to tech pro — start learning today.