?
Solved

Creating ActiveX Controls

Posted on 2000-02-23
5
Medium Priority
?
136 Views
Last Modified: 2010-05-02
How do I maintain the methods and properties of an existing VB control.
I am trying to create a "new" VB control which is based on the existing Combo box but wish to keep all of its default properties and methods
0
Comment
Question by:GScott
  • 2
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
paulstamp earned 150 total points
ID: 2551513
Using the VB control builder wizard you can automatically map them, otherwise you need to one by one add property let and property get statements, ie

Public Property Get Listindex() as Integer

   Listindex = combo1.listindex

End Property

Public Property Let Listindex(byval nIndex as integer)

    '@@@ need error trapping here
    combo1.listindex = nIndex

End Property

0
 

Author Comment

by:GScott
ID: 2551535
Thanks Paul (by the way where is the Control Builder Wizard?)
0
 
LVL 32

Expert Comment

by:Erick37
ID: 2551537
From Books Online:

"Using the ActiveX Control Interface Wizard
The ActiveX Control Interface Wizard can assist you in determining what properties to provide, and in delegating to the appropriate constituent controls.
After you have placed all the constituent controls you’re going to use on your UserControl, start the wizard and select your control. The wizard will examine your constituent controls, and produce a list of all the properties, methods, and events that appear in all their interfaces, plus those in the UserControl object’s interface, and the standard properties listed above. You can select from this list those properties, methods, and events you want in your control’s interface.
The wizard will produce default mappings of your control’s properties to properties of the UserControl object or of constituent controls. In subsequent steps, you can modify these mappings.
When you have finished determining your control’s interface and delegating to existing properties, the wizard will generate property procedure code to implement the properties, using the correct data types for standard properties, and including delegation code for all your property mappings, enormously reducing the amount of work required to generate a full-featured control."
0
 
LVL 32

Expert Comment

by:Erick37
ID: 2551549
The Wizard is an Add-In and can be selected thru Add-Ins->Add-In Manager
0
 

Author Comment

by:GScott
ID: 2551572
Thanks to Erick37
Unfortunately the answer was supplied by paulstamp a minute before your answer was received.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question