[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Creating ActiveX Controls

Posted on 2000-02-23
5
Medium Priority
?
134 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

649 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