Solved

Creating ActiveX Controls

Posted on 2000-02-23
5
125 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 50 total points
Comment Utility
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
Comment Utility
Thanks Paul (by the way where is the Control Builder Wizard?)
0
 
LVL 32

Expert Comment

by:Erick37
Comment Utility
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
Comment Utility
The Wizard is an Add-In and can be selected thru Add-Ins->Add-In Manager
0
 

Author Comment

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

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now