Repository Programmer's Guide for Visual Basic

You can use Microsoft Repository with Microsoft Visual Basic 6.0. The Visual Basic package includes:

  • The Microsoft Repository software.

  • The MDO Model (an information model that lets you store the structure of Visual Basic applications in the repository).

  • The Repository Add-in for Visual Basic (a Visual Basic add-in that automatically maintains the structure of your Visual Basic projects in the repository).

The following topics describe how Visual Basic, Microsoft Repository, and the Repository Add-in for Visual Basic interact, and some typical ways you can use Repository with Visual Basic.

For More Information The Microsoft Development Objects Model.

Visual Basic, Repository, and the Repository Add-in

Choosing How to Use Repository with Visual Basic


Visual Basic, Repository, and the Repository Add-in

Microsoft Repository is implemented both as a set of Automation objects and as a set of COM objects. Therefore, you can manipulate a repository and its contents by writing COM or Automation programs to manipulate these objects. In many cases, however, you do not need to manipulate the repository yourself; you can allow the Repository Add-in for Visual Basic to automatically maintain information in the repository.

Using Repository Directly

How the Repository Add-In Uses Repository


How You Can Use the Repository Directly

Using Repository Directly

Because Repository is implemented as a set of Automation objects, you can directly manipulate its contents from Visual Basic programs. You manipulate a repository directly to perform the following:

  • Create a new information model.

  • Extend an existing information model.

  • Retrieve information from any information model.

  • Store information using any information model other than the MDO Model.

  • Store information using any extensions of the MDO Model.

Note The Repository Add-in for Visual Basic populates the MDO Model with information about your Visual Basic projects. Do not store information directly in the MDO Model unless you extend it.


How the Repository Add-in Uses Repository

The Repository Add-in for Visual Basic automatically stores and maintains the structure of your projects in a repository. This section describes how the Repository Add-in for Visual Basic works.

The Repository Add-in for Visual Basic is an add-in for Microsoft Visual Basic 6.0. It mediates event-driven interaction between Visual Basic and the repository. Once you have registered the Repository Add-in with Visual Basic as an add-in, it will thereafter update the contents of the repository to reflect the current structure of any project when you create or modify it. It also will update the repository to reflect current information about an existing project whenever the project is opened or modified.

The Repository Add-in for Visual Basic also triggers events to which your Visual Basic add-ins can respond. For example, it triggers an event each time it inserts a new form or module in the repository.

For More Information RepVB Object

The following figure summarizes how Visual Basic, Repository, and the Repository Add-in for Visual Basic interact.


Choosing How to Use Repository with Visual Basic

You can choose how to use Repository. The choices you make affect how you set up your Visual Basic projects that use Repository.

  • Do you use Repository to manage your Visual Basic projects? If so, you must enable the Repository Add-in for Visual Basic as an add-in. Only after you register it can it automatically populate the MDO Model with information about your Visual Basic projects. You make the choice only once; whatever you decide affects all your Visual Basic projects.

  • Does your project directly manipulate Repository? Your project manipulates Repository directly only if it uses an open connection with a repository via an Automation object of type Repository. If your project manipulates Repository directly, you must include a reference to the Microsoft Repository type library.

  • Does your project need to respond to events triggered by the Repository Add-in for Visual Basic? If your project is an add-in, it might need to respond to particular events triggered by the Repository Add-in for Visual Basic. Include a reference to the Microsoft Repository Add-In type library. Your project should register for particular events to which you need to respond.

  • Does your project store values in extensions to the MDO Model, or does your project read information directly from the MDO Model? If it does, add references from your project to the Microsoft Development Objects type library and to the Microsoft Repository type library.


Scenarios for Using Repository

The following sections describe how to prepare for some typical scenarios using the repository with Visual Basic. Each section describes one scenario, and indicates how you should set up the corresponding Visual Basic project.

Ensuring That All Projects Are Represented in the Repository

Using SQL to Report on Repository Data

Extending the MDO Model

Extending the MDO Model and Using the Repository Add-in

Using the Repository without the Repository Add-in or the MDO Model


Ensuring That All Projects Are Represented in the Repository

Suppose a colleague has created a Visual Basic application that inspects the repository database directly, preparing various reports about the structure of her Visual Basic projects. You want to run this application periodically to inspect and report on the structure of your projects.

To benefit from your colleague’s application, you must ensure that the repository represents the structure of all of your projects.

To represent your projects in the repository

  1. Register the Repository Add-in for Visual Basic as an add-in.

  2. Open and close each existing Visual Basic project whose structure you want represented in the repository.
    By opening a Visual Basic project, you ensure that the Repository Add-in inserts a representation of the project structure into the repository.

  3. Create any new projects as you would normally.
    For each new project you create, the Repository Add-in automatically inserts the project structure into the repository.

  4. Modify any projects as you would normally.
    Each time you modify a project’s structure, the Repository Add-in automatically ensures that the new project structure is represented in the repository.

Now that the structures of your projects are online in the repository, you can profitably run your colleague’s application to report on them.


Using SQL to Report on Repository Data

Suppose you want to determine whether any two forms represented in the repository share a name. You can create a Visual Basic project to display those names that are common to two or more forms. One way to accomplish this is to do it with query logic in a Visual Basic module.

To use queries against the repository database, your Visual Basic module should follow these steps:

  1. Open the repository.

  2. Obtain an ODBC connection to the repository database.

  3. Run the SQL query to select the names shared by multiple forms.

  4. Display the results on a Visual Basic form.

Before you run this project, add a reference to the Microsoft Repository type library. You need this reference because the project calls Repository directly to open the repository. (Type library references are managed by Visual Basic through the References dialog box, accessible from the Project menu.)

For More Information Repository SQL Schema; MDO Model SQL Schema


Extending the MDO Model

Suppose that you are tracking bugs reported on your Visual Basic projects. The MDO Model already accommodates information about your projects. You want to supplement that information with a description of each bug, the project against which the bug is reported, and the person who discovers each bug. You also want a new Visual Basic application with which you can enter and later examine reported bugs.

Before you create the Visual Basic project for this new application, you must extend the MDO Model to include a bug class, a person class, a person-reports-bug relationship type, and a project-has-bug relationship type. (To learn how to extend an information model, see Information Model Creation.)

When you create the project, add the following references:

  1. To the Microsoft Development Objects type library. You must add this reference because your project will manipulate the contents of the MDO Model directly.

  2. To the Microsoft Repository type library. You must add this reference because your project will manipulate the contents of the repository directly.

Before you run your new application, you must ensure that each of your Visual Basic projects is represented in the repository. Thus, you must register the Repository Add-in for Visual Basic as an add-in and open and close each project on which you want to track bugs.

Your new application can be run independent of the Visual Basic interactive development environment. Thus, do not implement it as a Visual Basic add-in. You need not register for any events triggered by the Repository Add-in for Visual Basic. Therefore, you do not need to add a reference to the Microsoft Repository Add-In type library.

After it has run, your new application will accept input from users, validate the input against project-related data from the MDO Model, and add bug-related information to your MDO Model extensions.


Extending the MDO Model and Using the Repository Add-in

One useful extension to the MDO for developers (and development managers) would be a target completion date, or due date, for Visual Basic projects that are under development. You could then create a Visual Basic add-in that prompts you for a due date each time you create a new project. To create such an add-in, you should follow these steps:

To extend the MDO Model by adding a property, DateDue, to the MdoProject class

  1. Register the Repository Add-in for Visual Basic as an add-in.

  2. Create your add-in as a Visual Basic project.

  3. Within the Visual Basic project that implements your add-in, add references to the Microsoft Repository type library and the Microsoft Development Objects type library.

  4. Register your add-in with Visual Basic.

After you have registered your add-in, it will prompt you for a due date each time you create a new Visual Basic project. (To learn how to extend an information model, see Information Model Creation.

To create a Visual Basic project that implements your add-in

  1. At design time, create an MdoProjectEvents event sink module.

  2. At run time, when your add-in is started, it must register your event sink object for project-related events via the RepVB.ConnectProjectEvents method of the Repository Add-in.

  3. When a new project is created, the ObjectAdded method of your event sink object will be invoked.

  4. Within that method, prompt the user for a due date and establish that user-supplied date as the value of the property DueDate in the repository’s representation of the new project.

For More Information RepVB Object; MdoProjectEvents Object


Using Repository without the Repository Add-in or the MDO Model

Suppose your organization publishes design specifications for low-income housing projects. Occasionally, you learn that a design specification contains an error, that it violates a particular building code. You can create a Visual Basic project that keeps track of the documents, the building codes, and the errors.

This scenario differs from the other scenarios in this section in several important respects:

  1. The solution does not use the add-in or the MDO Model (because it doesn’t keep track of Visual Basic projects, it keeps track of specifications, building codes, and violations). You do not need the Repository Add-in for Visual Basic. In fact, you can build this project without even registering the Repository Add-in for Visual Basic as an add-in.

  2. You can solve this problem without creating a Visual Basic add-in. You simply create a Visual Basic project like any other.

  3. Because you are not using the MDO Model, you do not need to add a reference to the Microsoft Development Objects type library. However, because you are manipulating the contents of the repository, you must add a reference to the Microsoft Repository type library.


Collection Descriptors

  • Relationship Type Descriptor

  • Source Is Origin Descriptor

  • Maximum Collection Size Descriptor

  • Minimum Collection Size Descriptor

  • Deletes Propagated Descriptor

  • Sequenced Collection Descriptor

  • Destinations Named Descriptor

  • Case-Sensitive Names Descriptor

  • Unique Names Descriptor


Relationship Type Descriptor

The type of relationship by which all items of the collection are connected to a common source object.


Source Is Origin Descriptor

Specifies whether or not the source object for the collection is also the origin object. Value can be set to Yes or No.


Maximum Collection Size Descriptor

The maximum number of items that can be contained in the collection. Value can be set to Zero, One, a specific numeric value, or Many. The Repository engine does not enforce this maximum.


Minimum Collection Size Descriptor

The minimum number of items that must be contained in the collection. Value can be set to Zero, One, a specific numeric value, or Many. The Repository engine does not enforce this minimum.


Deletes Propagated Descriptor

Specifies whether or not the deletion of an origin object or deletion of a relationship in the collection will cause the deletion of the corresponding destination object. Value can be set to Yes or No.


Sequenced Collection Descriptor

Specifies whether or not the items in the destination collection have an explicitly defined sequence. Collections of origin objects are never sequenced. Value can be set to Yes or No.


Destinations Named Descriptor

Specifies whether or not the relationship type for the collection permits the naming of destination objects. Value can be set to Yes or No.


Case-Sensitive Names Descriptor

Specifies whether or not the relationship type for the collection permits the use of case-sensitive names for destination objects. This descriptor is meaningful only for collections whose relationship type permits destination objects to be named. Value can be set to Yes, No, or Not Applicable.


Unique Names Descriptor

Specifies whether or not the relationship type for the collection requires that the name of a destination object be unique within the collection of destination objects. This descriptor is meaningful only for collections whose relationship type permits destination objects to be named. Value can be set to Yes, No, or Not Applicable.


The Microsoft Repository Visual Basic Add-in

If you install a third party development tool that is an extension of the Visual Basic Integrated Development Environment and uses Microsoft Repository, the Repository Add-in for Visual Basic will be activated when you install the third party tool. If you are not using such a tool, it is not recommended that you activate the Repository Add-in for Visual Basic. Doing so will introduce overhead that provides no benefit to you.

The repository engine is capable of running without the Repository Add-in for Visual Basic. The Repository Add-in is only required to keep the MDO Model instance data synchronized with your Visual Basic projects. Consequently, if you install a third party development tool that uses Microsoft Repository, but does not use the MDO Model, then the Repository Add-in for Visual Basic is not required and will not be activated.


The Microsoft Development Objects Model

The Microsoft Development Objects Model (MDO Model) is an information model. It describes the kinds of data that Visual Basic stores in the repository as you create Visual Basic projects.

The following sections introduce the MDO Model.

The Structure of a Visual Basic Project

The MDO Model


The Structure of a Visual Basic Project

Consider an accounts receivable project, which contains one module and two forms. Each of the forms contains some controls. The structure of the project is shown in the following outline:

Project: AccountsReceivable
   Module: MyMain
   Form: Customer
      Control: LabelCustomerName
      Control: LabelOutstandingBalance
      Control: TextCustomerName
      Control: TextOutstandingBalance
   Form: Invoice
      Control: LabelCustomerName
      Control: LabelInvoiceDate
      Control: LabelPastDueCharges
      Control: LabelCurrentCharges
      Control: LabelTotalCharges
      Control: TextCustomerName
      Control: TextInvoiceDate
      Control: TextPastDueCharges
      Control: TextCurrentCharges
      Control: TextTotalCharges
      Control: FrameInvoiceCopies
         Control: CheckboxAccountSupervisor
         Control: CheckboxRegionalCreditDept
         Control: CheckboxCollectionsDept
      Control: CommandPrintInvoice
      Control: CommandSaveWithoutPrint
      Control: CommandCancelInvoice

The AccountsReceivable project contains two forms and a module at the first outline level below the project itself. The outline shows other kinds of component organized at the next level under the two forms, but there are none shown under the MyMain module. The outline reveals a characteristic of Visual Basic projects; forms may contain controls, but modules may not.

The Invoice form contains FrameInvoiceCopies, a control that contains three other controls. Here too, the example illustrates a characteristic of Visual Basic projects; a control can contain other controls. The following figure represents the FrameInvoiceCopies control:

There are four controls visible in the figure: one frame and three checkboxes. Speaking casually, we might say that the Invoice form contains all four controls. However, it is more precise to say that the Invoice form contains only the FrameInvoiceCopies control. Each checkbox is contained not within the Invoice form, but within the FrameInvoiceCopies control.

There is a similar outline that can be created for any Visual Basic project because every Visual Basic project has an inherent structure. It is this structure that the Repository Add-in for Visual Basic stores in the repository when it populates the MDO Model. And so it is this structure that the MDO Model must accommodate.


The MDO Model

The following kinds of Visual Basic components are defined in the MDO Model:

Visual Basic component | MDO Model component
Visual Basic project | MdoProject
Standard module | MdoStdModule
Class module | MdoClassModule
Form module | MdoVBForm
MDI form | MdoMDIForm
Dialog form | MdoMSForm
Property page | MdoPropertyPage
Visual Basic control | MdoControl
Custom control | MdoUserControl
Document object | MdoUserDocument
Custom base class module | MdoDesigner
Related document | MdoRelatedDocument
Resource file | MdoResourceFile
Reference to a type library | MdoTypeLibRef
Reference to another Visual Basic project | MdoProjectRef

The following figure illustrates the relationships between the various MDO Model components:


MDO Model Collections

When the Repository Add-in for Visual Basic creates the MDO Model in your repository, it adds the Contents collection to the Root Repository Object. This enables you to enumerate all of the Visual Basic projects that have been stored in the repository.

Within each MdoProject object, the MdoComponents collection contains one object for each component that exists in the project. This collection is a collection of heterogeneous objects; that is, the various controls, forms, modules, and so on are all in the collection. Although the objects in the collection conform to different MDO Model classes, they all also conform to the RepositoryObject class. Thus, they can all be manipulated (at a fundamental level) in a homogeneous manner.

Within each MdoProject object, the MdoReferences collection contains one object for each reference to either an external type library or another Visual Basic project.

Each MdoControl, MdoMDIForm, MdoPropertyPage, MdoUserControl, MdoDocument, and MdoVBForm has an MdoControls collection. The MdoControls collection contains one object for each imbedded control. If there are no imbedded controls, the collection is empty (but it still exists). Since controls can contain other controls, the control-collection-control arrangement recurses until a control is reached that has no imbedded controls.

Some MdoControl objects represent custom controls or controls that have been supplied by an independent software vendor (ISV). For each of these MdoControl objects, the MdoControlUsage collection connects the MdoControl object to its corresponding MdoUserControl object.


MDO Model Properties

With the exception of the MdoControl class, all classes of the MDO Model support the following three properties:

Property | Description
Description | Description of the MDO component.
FileName | Name of the file that is associated with the MDO component.
TimeStamp | The time at which the MDO component was last synchronized with the repository.

The MdoControl class supports the following properties:

Property | Description
ClassName | Name of the Visual Basic class module that defines this control.
Description | Description of the Visual Basic control.
Index | Index value for the Visual Basic control, if the control is a Visual Basic control array. If the control is not a control array, this property is set to negative one.
ProgID | Program identifier for the Visual Basic control.

For More Information MDO Automation Objects; MDO Model COM Reference


Creating a Repository-Aware Add-In Module

If you want to create a repository-aware Visual Basic add-in module, you must consider certain issues as described in the following sections.

Ensuring the MDO Model Is Present

Ensuring that the Repository Add-in Is Active

Repository Instances and the Repository Add-in

Processes and the Repository Add-in

Multiple Threads in the Repository Add-in

For More Information RepVB Object; MDO Automation Objects


Ensuring the MDO Model Is Present

By default, a repository database does not contain the MDO Model. The MDO Model is not added to the repository until you take the following steps:

  1. Ensure that the Repository 1.0 Add-In Module (the Repository Add-in for Visual Basic) is on the list of active add-in modules.

  2. Start Visual Basic.

When you start Visual Basic, the Repository Add-in inspects the repository database, discovers that the MDO Model is not present, and adds it.

If you have an information model that extends the MDO Model, do not insert these extensions into the repository as part of your information model’s installation or setup procedure. There is no guarantee that the MDO Model will be present in the repository when your setup or installation is run. Instead, when your add-in is started, it should test for the existence of the MDO Model (and your extension to it), and add your extensions only when the MDO Model is present without your extensions.


Ensuring that the Repository Add-in Is Active

By default, the Repository Add-in for Visual Basic is not active. Each Visual Basic user can choose to add the Repository Add-in to the list of active add-in modules. If your add-in module calls the Repository Add-in for Visual Basic, you must ensure that it is active before making those calls.

There are two cases to consider:

  • If your add-in module is loaded manually while Visual Basic is running, you can check immediately to see if the Repository Add-in is active.

  • If your module is loaded as part of the Visual Basic initialization procedure, you must wait until Visual Basic fires the event indicating that all add-in modules have been loaded. Only then can you check whether the Repository Add-in is active.

Even if the Repository Add-in is active when your module starts, situations can arise that cause the Repository Add-in to shut down. If the Repository Add-in shuts down, it fires a Shutdown event during its shutdown processing. Your add-in module should register for this event.


Repository Instances and the Repository Add-in

In order to conserve run-time resources, you can share a repository instance with the Repository Add-in for Visual Basic. The Repository Add-in includes a method, GetRepository, that returns an interface pointer to the repository instance it uses.

Managing Transactions with a Shared Repository Instance

Sharing Run-time Objects with a Shared Repository Instance


Managing Transactions with a Shared Repository Instance

If you share a repository instance with the Repository Add-in, you also share a transaction space with it. The Repository Add-in cooperates with the other add-ins with which it shares transaction space by adhering to these rules:

  • The Repository Add-in commits or cancels its pending transactions before firing any events to other add-in modules.

    Thus, whenever your add-in needs to respond to an event by modifying the contents of the repository, it can bracket the modifications in a transaction, make the appropriate modifications, and complete the transaction.

  • When the Repository Add-in fires events to the various repository-aware add-in modules, it does so sequentially.

    That is, the Repository Add-in invokes the event sink method for the first registered add-in module, waits for that module to complete its processing in response to that event, and then invokes the event sink method for the next registered add-in module. Thus, when your add-in receives an event fired by the Repository Add-in, you can be confident that no other add-in module is currently responding to that event.

Your add-in module might not be the only module that shares a repository instance with the Repository Add-in; design your add-in to cooperate with other add-in modules. Thus, you should never return control to the Repository Add-in until your thread has finished responding to the event that the Repository Add-in fired. That is, do not return control to the Repository Add-in while you still have an active transaction in that repository instance.


Sharing Run-time Objects with a Shared Repository Instance

There are other effects (besides shared transaction space) of sharing a repository instance with the Repository Add-in. Most notably, if you share a repository instance, you can directly manipulate the same Automation objects that the Repository Add-in is using. This can improve the efficiency of your add-in.

Consider what happens when the Repository Add-in fires an event indicating that an MdoVBForm object has been added to the repository. The event parameters include an interface pointer to the Automation object representing the MdoVBForm. If you are using the same repository instance as the Repository Add-in, you can use this Automation object to immediately begin manipulating the repository object representing the MdoVBForm. If you are not using the same repository instance, you must perform additional steps to initialize your own Automation object:

  1. Using the same repository instance that the Repository Add-in is using, retrieve the internal identifier from the Automation object that represents the new MdoVBForm.

  2. Using your private repository instance, use the GetObject method to instantiate an Automation object whose internal identifier matches the one you just retrieved.

  3. Manipulate the MdoVBForm via your new Automation object.


Processes and the Repository Add-in

The Repository Add-in for Visual Basic runs in the Visual Basic process. You can run in the same process as the Repository Add-in, or in a different process. In most cases you should run in the same process.

There is a benefit to running in the same process as the Repository Add-in. Any modification that the Repository Add-in makes to the repository is immediately visible to you; you do not need to refresh your cache to see such modifications. If you run in a different process from the Repository Add-in, however, refresh your cache to be assured that the data in your cache accurately reflects any changes that the add-in has recently made to the repository.

To run in the same process, build your add-in as a dynamic link library (DLL). To run in your own process, build your add-in as an executable program.


Multiple Threads in the Repository Add-in

There are two situations in which the Repository Add-in can start a thread to perform some background processing against the repository. They are:

  • During initialization of Visual Basic, the Repository Add-in performs its initialization functions in a background thread.

  • The Repository Add-in uses a background thread to delete data from the repository.

By performing its initialization in a background thread, the Repository Add-in speeds the initialization of Visual Basic. Similarly, by using a background process to delete objects from the repository, the Repository Add-in ensures that lengthy delete propagation operations do not needlessly lengthen the response time of the Visual Basic interactive development environment.

You should be aware of this background processing for two reasons.

  • First, if you call the Repository Add-in during the initialization of your add-in module, you can slow down the initialization of Visual Basic. For example, if you call the Repository Add-in to retrieve the repository instance that it is using, the Repository Add-in waits until it is fully initialized before responding to your GetRepository call. If you make this call as a part of your initialization, and you initialize your add-in module in a foreground thread, the foreground processing — including the overall initialization of Visual Basic — will be delayed. You can avoid this delay by either performing your initialization in a background thread or by postponing your call to GetRepository until the last possible moment.

  • Second, you should be aware that the repository instance can occasionally reflect obsolete objects — objects whose deletion is pending in a transaction of a background thread.


Multiple Threads in Your Add-in

You can start a background thread to manipulate the contents of the repository. If your background thread performs no updates against the repository, you can use the same repository instance as the Repository Add-in for Visual Basic. However, if your background thread will modify the contents of the repository, you should create and use a separate repository instance for this thread.

When Microsoft Jet is used to manage your repository database, a special restriction applies with regard to using multiple threads. An open repository instance to a repository database that is managed by Microsoft Jet can only be used by the thread that created the instance.

Since Visual Basic runs all in-process add-in modules in the same thread, this restriction is not a problem for a single-threaded add-in module. However, if your add-in accesses the repository through multiple threads, and your repository database is managed by Microsoft Jet, you should create and use a separate repository instance for each thread that accesses the repository.


RepVB Object

See Also Properties Methods

The Repository Add-in for Visual Basic (RepVB) manages interaction between Visual Basic and the repository. To initiate the mediation, you must register RepVB as an add-in. Thereafter, each time you create or modify a Visual Basic project, RepVB can respond to the events that Visual Basic triggers. When a Visual Basic event indicates a change in the structure of a project, RepVB responds by updating the contents of the repository. In this way, RepVB ensures that the repository reflects the current structure of your projects.

RepVB also triggers events to which your Visual Basic add-ins can respond. To respond to RepVB events, you must implement an event sink object. RepVB supports five different event sink objects:

  1. MdoAddInEvents Object

  2. MdoComponentEvents Object

  3. MdoControlEvents Object

  4. MdoProjectEvents Object

  5. MdoReferenceEvents Object

To connect or disconnect your event sink object from RepVB events, use the connection and disconnection methods that are provided by the RepVB object.

Properties

Property | Description
IsSynchronizing | Indicates whether or not RepVB is currently performing synchronization processing.

Methods

Method | Description
ConnectAddInEvents | Connects the event sink object supplied by the caller to events that are related to the state of the RepVB Add-in.
ConnectComponentEvents | Connects the event sink object supplied by the caller to component-related RepVB events.
ConnectControlEvents | Connects the event sink object supplied by the caller to control-related RepVB events.
ConnectProjectEvents | Connects the event sink object supplied by the caller to project-related RepVB events.
ConnectReferenceEvents | Connects the event sink object supplied by the caller to reference-related RepVB events.
ConnectRepository | Connects the RepVB Add-in to the specified repository.
DisconnectAddInEvents | Disconnects the specified event sink object from events that are related to the state of the RepVB Add-in.
DisconnectComponent Events | Disconnects the specified event sink object from component-related RepVB events.
DisconnectControlEvents | Disconnects the specified event sink object from control-related RepVB events.
DisconnectProjectEvents | Disconnects the specified event sink object from project-related RepVB events.
DisconnectReference Events | Disconnects the specified event sink object from reference-related RepVB events.
GetMDOObject | Retrieves the MDO object that is associated with the specified Visual Basic object.
GetRepository | Retrieves the opened repository instance that is currently being used by the RepVB Add-in.
GetVBObject | Retrieves the Visual Basic object that is associated with the specified MDO object.
SynchronizeRepository | Synchronizes the repository with all currently open projects.


RepVB ConnectAddInEvents Method

See Also

This method connects the specified event sink object to events that are related to the state of the RepVB Add-in.

Syntax

variable = object.ConnectAddInEvents( eventSinkObj )

The ConnectAddInEvents method has these parts:

Part | Description
variable | A variable declared as a long integer. Receives a number that identifies the specific connection that has been made.
object | The variable name of the RepVB object.
eventSinkObj | The event sink object that is to receive add-in related events. This event sink implements methods defined for the MdoAddInEvents object.


RepVB ConnectComponentEvents Method

This method connects the specified event sink object to RepVB for receiving component-related events.

Syntax

variable = object.ConnectComponentEvents( eventSinkObj )

The ConnectComponentEvents method has these parts:

Part | Description
variable | A variable declared as a long integer. Receives a number that identifies the specific connection that has been made.
object | The variable name of the RepVB object.
eventSinkObj | The event sink object that is to receive component-related events. This event sink implements methods defined for the MdoComponentEvents object.


RepVB ConnectControlEvents Method

This method connects the specified event sink object to RepVB for receiving control-related events.

Syntax

variable = object.ConnectControlEvents( eventSinkObj, progId )

The ConnectControlEvents method has these parts:

Part | Description
variable | A variable declared as a long integer. Receives a number that identifies the specific connection that has been made.
object | The variable name of the RepVB object.
eventSinkObj | The event sink object that is to receive control-related events. This event sink implements methods defined for the MdoControlEvents object.
progId | (Optional). A string containing the programmatic identifier that represents the kind of control for which you wish to receive events. If this parameter is not specified, you will receive all control-related events.


RepVB ConnectProjectEvents Method

This method connects the specified event sink object to RepVB for receiving project-related events.

Syntax

variable = object.ConnectProjectEvents( eventSinkObj )

The ConnectProjectEvents method has these parts:

Part | Description
variable | A variable declared as a long integer. Receives a number that identifies the specific connection that has been made.
object | The variable name of the RepVB object.
eventSinkObj | The event sink object that is to receive project-related events. This event sink implements methods defined for the MdoProjectEvents object.


RepVB ConnectReferenceEvents Method

This method connects the specified event sink object to RepVB for receiving reference-related events.

Syntax

variable = object.ConnectReferenceEvents( eventSinkObj )

The ConnectReferenceEvents method has these parts:

Part | Description
variable | A variable declared as a long integer. Receives a number that identifies the specific connection that has been made.
object | The variable name of the RepVB object.
eventSinkObj | The event sink object that is to receive reference-related events. This event sink implements methods defined for the MdoReferenceEvents object.


RepVB ConnectRepository Method

This method connects the RepVB Add-in to the specified repository. If another repository was previously connected, it is disconnected, and a RepositoryInvalid event is fired.

Syntax

variable = object.ConnectRepository( connectOptions, user, password )

The ConnectRepository method has these parts:

Part | Description
variable | A variable declared as a long integer. Receives the value zero if the connect was successful, nonzero otherwise.
object | The variable name of the RepVB object.
connectOptions | The ODBC connection string to be used for accessing the database server that hosts your repository.
user | The user name to use for identification to the database server. This parameter is optional.
password | The password that matches the user input parameter. This parameter is optional.

Remarks

When you connect to a repository, RepVB performs an automatic project synchronization for all open Visual Basic projects. This effectively adds the projects to the repository, if the repository to which you are connecting does not already contain information about the currently open projects.


RepVB DisconnectAddInEvents Method

This method disconnects the specified event sink object from RepVB. The event sink object will not be sent any more events related to the state of the RepVB Add-in.

Syntax

Call object.DisconnectAddInEvents( connection )

The DisconnectAddInEvents method has these parts:

Part | Description
object | The variable name of the RepVB object.
connection | The connection number for the event sink object that is to be disconnected from RepVB Add-in related events.


RepVB DisconnectComponentEvents Method

This method disconnects the specified event sink object from RepVB. The event sink object will not be sent any more component-related events.

Syntax

Call object.DisconnectComponentEvents( connection )

The DisconnectComponentEvents method has these parts:

Part | Description
object | The variable name of the RepVB object.
connection | The connection number for the event sink object that is to be disconnected from component-related events.


RepVB DisconnectControlEvents Method

This method disconnects the specified event sink object from RepVB. The event sink object will not be sent any more control-related events.

Syntax

Call object.DisconnectControlEvents( connection )

The DisconnectControlEvents method has these parts:

Part | Description
object | The variable name of the RepVB object.
connection | The connection number for the event sink object that is to be disconnected from control-related events.


RepVB DisconnectProjectEvents Method

This method disconnects the specified event sink object from RepVB. The event sink object will not be sent any more project-related events.

Syntax

Call object.DisconnectProjectEvents( connection )

The DisconnectProjectEvents method has these parts:

Part | Description
object | The variable name of the RepVB object.
connection | The connection number for the event sink object that is to be disconnected from project-related events.


RepVB DisconnectReferenceEvents Method

This method disconnects the specified event sink object from RepVB. The event sink object will not be sent any more reference-related events.

Syntax

Call object.DisconnectReferenceEvents( connection )

The DisconnectReferenceEvents method has these parts:

Part | Description
object | The variable name of the RepVB object.
connection | The connection number for the event sink object that is to be disconnected from reference-related events.


RepVB GetMDOObject Method

When you add Visual Basic objects to a project, RepVB automatically adds corresponding MDO objects to the repository. Use this method to retrieve the MDO object that corresponds to a particular Visual Basic object.

Syntax

Set variable = object.GetMDOObject( vbObject )

The GetMDOObject method has these parts:

Part | Description
variable | A variable declared as a MDO object. Receives the MDO object that represents the vbObject Visual Basic object.
object | The variable name of the RepVB object.
vbObject | The Visual Basic object whose corresponding MDO object is to be retrieved.


RepVB GetRepository Method

Retrieves the opened repository instance that is currently being used by the RepVB Add-in.

Syntax

Set variable = object.GetRepository

The GetRepository method has these parts:

Part | Description
variable | A variable declared as a Repository object. Receives the instance of the open repository that RepVB is currently using.
object | The variable name of the RepVB object.


RepVB GetVBObject Method

When you add Visual Basic objects to a project, RepVB automatically adds corresponding MDO objects to the repository. Use this method to retrieve the Visual Basic object that corresponds to a particular MDO object.

Syntax

Set variable = object.GetVBObject( mdoObject )

The GetVBObject method has these parts:

Part | Description
variable | A variable declared as a Visual Basic object of the appropriate type. Receives the Visual Basic object that is represented by the mdoObject object in the repository.
object | The variable name of the RepVB object.
mdoObject | The MDO object whose corresponding Visual Basic object is to be retrieved.


RepVB IsSynchronizing Property

This property indicates whether or not RepVB is currently performing a project synchronization. A nonzero value indicates that RepVB is performing a synchronization. A zero value indicates that RepVB is not performing a synchronization. For more information about repository synchronization, see Synchronizing the Repository.

Syntax

object.IsSynchronizing

The IsSynchronizing property syntax has these parts:

Part | Description
object | The variable name of the RepVB object.


RepVB SynchronizeRepository Method

RepVB provides the capability to force a synchronization of currently open projects with the repository. This method performs that synchronization. For more information about repository synchronization, see Synchronizing the Repository.

Syntax

variable = object.SynchronizeRepository

The SynchronizeRepository method has these parts:

Part | Description
variable | A variable declared as a long integer. Receives the value zero if the synchronization was successful, nonzero otherwise.
object | The variable name of the RepVB object.

Remarks

If this method is unsuccessful in its attempt to synchronize the currently open projects with the repository, RepVB will shut itself down.


Synchronizing the Repository

The structure of your Visual Basic projects is maintained in two places; in the Visual Basic project itself, and, if the Repository Add-in for Visual Basic (RepVB) is registered, in the repository.

Whenever the same information is maintained in two locations, there exist possibilities for the two copies of the information to become unsynchronized with respect to each other. These are the most common possibilities:

  • If you copy someone else's Visual Basic project into your environment and open it. In this case, the repository does not have any information at all about the project.

  • If you open a Visual Basic project, modify one or more of the project components, and then quit the Visual Basic environment without saving the project. In this case, RepVB has already committed the corresponding repository changes, so the repository reflects the state of your Visual Basic project as if you had saved the changes.

  • If multiple users are working on the same Visual Basic project, but each user has a local repository. In this case, changes made by other users will not be reflected in your repository.

  • If you open a Visual Basic project, modify one or more of the project components, and a power outage or system failure occurs. In this case, RepVB has already committed the corresponding repository changes, so the repository reflects the state of your Visual Basic project as if the changes had been successfully saved.

In order to keep the repository information about a project synchronized with the Visual Basic project itself, RepVB performs an automatic project synchronization each time a project is opened in the Visual Basic environment. Automatic project synchronization consists of checking the last-modified time associated with each project component with the TimeStamp property of the corresponding MDO Model component. (Visual Basic project components are stored as separate files in the supporting file system. The last-modified time for a Visual Basic project component is the time and date that the project component's corresponding file was modified.) When a project component is found that has been modified either before or after the last time that it was synchronized with the repository, the repository copy of the information for that component is refreshed.

Automatic project synchronization is a very effective mechanism to keep the two copies of your Visual Basic project structure synchronized. However, it relies on the last-modified times that are maintained by the file system. If these times are not accurately maintained, then the automatic project synchronization feature of RepVB may not detect that a project has become unsynchronized.

As a last resort, RepVB provides a manual project synchronization capability. A manual project synchronization is only performed when you explicitly request it. Manual project synchronization consists of forcing the refresh of all project components for all open projects, regardless of their last-modified time and TimeStamp property values.


MdoAddInEvents Object

See Also Methods

To be able to respond to events related to the state of the Repository Add-in for Visual Basic (RepVB), you must supply an MdoAddInEvents event sink object that implements these methods:

Methods

Method | Description
RepositoryInvalid | Invoked when the Repository Add-in is switching to another repository.
Shutdown | Invoked when the Repository Add-in module is stopping.

Remarks

To begin receiving events, register your MdoAddInEvents event sink object with the ConnectAddInEvents Repository Add-in method.


MdoAddInEvents RepositoryInvalid Method

The Repository Add-in invokes this method when it is disconnecting from one repository and connecting to another repository. Any repository instance that your add-in may have obtained from the repository is no longer the currently open repository for the Repository Add-in.

Syntax

Sub RepositoryInvalid


MdoAddInEvents Shutdown Method

The Repository Add-in invokes this method when it is preparing to stop processing and unload itself. This is the last event that the Repository Add-in will send prior to shut down.

Syntax

Sub Shutdown


MdoComponentEvents Object

See Also Methods

An MDO component object is a repository object that implements the IMdoComponent interface. MDO Model classes that implement this interface are:

  • MdoClassModule

  • MdoDesigner

  • MdoMDIForm

  • MdoMSForm

  • MdoPropertyPage

  • MdoRelatedDocument

  • MdoResourceFile

  • MdoStdModule

  • MdoUserDocument

  • MdoUserControl

  • MdoVBForm

To be able to respond to component-related Repository Add-in (RepVB) events, you must supply an MdoComponentEvents event sink object that implements the following methods:

Methods

Method | Description
ObjectAdded | Invoked when an MDO component object has been added to the repository.
ObjectChangedFileName | Invoked when the file associated with a Visual Basic component has been renamed.
ObjectRemoved | Invoked when an MDO component object has been removed from the repository.
ObjectRenamed | Invoked when an MDO component object has been renamed in the repository.
ObjectSynchronized | Invoked when an MDO component object has been synchronized with the corresponding Visual Basic component.

Remarks

To begin receiving events, register your MdoComponentEvents event sink object with the ConnectComponentEvents Repository Add-in method.


MdoComponentEvents ObjectAdded Method

The Repository Add-in invokes this method when an MDO component object has been added to the repository. The method is invoked for each event sink object that has been registered for component-related Repository Add-in events.

Syntax

Sub ObjectAdded( MdoObject As Object, VBObject As Object )

The ObjectAdded method has these parts:

Part | Description
MdoObject | The MDO component object that has been added to the repository.
VBObject | The corresponding Visual Basic component.


MdoComponentEvents ObjectChangedFileName Method

The Repository Add-in invokes this method when the FileName property of an MDO component object has been changed in the repository. The method is invoked for each event sink object that has been registered for component-related Repository Add-in events.

Syntax

Sub ObjectChangedFileName( MdoObject As Object, VBObject As Object, OldFileName As String )

The ObjectChangedFileName method has these parts:

Part | Description
MdoObject | The MDO component object whose corresponding Visual Basic component file has been renamed.
VBObject | The corresponding Visual Basic component.
OldFileName | The old file name for the Visual Basic component file.

Remarks

Do not confuse the name of an MDO component object with the name of the file that is associated with the corresponding Visual Basic component. If the object name is changed, the ObjectRenamed method is invoked, not this method.


MdoComponentEvents ObjectRemoved Method

The Repository Add-in invokes this method when an MDO component object has been removed from the repository. The method is invoked for each event sink object that has been registered for component-related Repository Add-in events.

Syntax

Sub ObjectRemoved( MdoObject As Object, VBObject As Object )

The ObjectRemoved method has these parts:

Part | Description
MdoObject | The MDO component object that has been removed from the repository.
VBObject | The corresponding Visual Basic component.


MdoComponentEvents ObjectRenamed Method

The Repository Add-in invokes this method when the name of an MDO component object has been changed in the repository. The method is invoked for each event sink object that has been registered for component-related Repository Add-in events.

Syntax

Sub ObjectRenamed( MdoObject As Object, VBObject As Object, OldName As String )

The ObjectRenamed method has these parts:

Part | Description
MdoObject | The MDO component object that has been renamed in the repository.
VBObject | The corresponding Visual Basic component.
OldName | The name that this object had before it was renamed.

Remarks

Do not confuse the name of an MDO component object with the name of the file that is associated with the corresponding Visual Basic component. If the file name is changed, the ObjectChangedFileName method is invoked, not this method.


MdoComponentEvents ObjectSynchronized Method

The Repository Add-in invokes this method when an MDO component object has been synchronized with its corresponding Visual Basic component. The method is invoked for each event sink object that has been registered for component-related Repository Add-in events.

Syntax

Sub ObjectSynchronized( MdoObject As Object, VBObject As Object )

The ObjectSynchronized method has these parts:

Part | Description
MdoObject | The MDO component object that has been synchronized.
VBObject | The corresponding Visual Basic component.


MdoControlEvents Object

See Also Methods

To be able to respond to control-related Repository Add-in (RepVB) events, you must supply an MdoControlEvents event sink object that implements these methods:

Methods

Method | Description
ObjectAdded | Invoked when an MdoControl object has been added to the repository.
ObjectRemoved | Invoked when an MdoControl object has been removed from the repository.
ObjectRenamed | Invoked when an MdoControl object has been renamed in the repository.
ObjectSynchronized | Invoked when an MDO control object has been synchronized with the corresponding Visual Basic control.

Remarks

To begin receiving events, register your MdoControlEvents event sink object with the ConnectControlEvents Repository Add-in method.


MdoControlEvents ObjectAdded Method

The Repository Add-in invokes this method when an MdoControl object has been added to the repository. The method is invoked for each event sink object that has been registered for control-related Repository Add-in events.

Syntax

Sub ObjectAdded( MdoObject As Object, VBObject As Object )

The ObjectAdded method has these parts:

Part | Description
MdoObject | The MDO control object that has been added to the repository.
VBObject | The corresponding Visual Basic control.


MdoControlEvents ObjectRemoved Method

The Repository Add-in invokes this method when an MdoControl object has been removed from the repository. The method is invoked for each event sink object that has been registered for control-related Repository Add-in events.

Syntax

Sub ObjectRemoved( MdoObject As Object, VBObject As Object )

The ObjectRemoved method has these parts:

Part | Description
MdoObject | The MDO control object that has been removed from the repository.
VBObject | The corresponding Visual Basic control.


MdoControlEvents ObjectRenamed Method

The Repository Add-in invokes this method when the name of an MdoControl object has been changed in the repository. The method is invoked for each event sink object that has been registered for control-related Repository Add-in events.

Syntax

Sub ObjectRenamed( MdoObject As Object, VBObject As Object, OldName As String )

The ObjectRenamed method has these parts:

Part | Description
MdoObject | The MDO control object that has been renamed in the repository.
VBObject | The corresponding Visual Basic control.
OldName | The name that this object had before it was renamed.


MdoControlEvents ObjectSynchronized Method

The Repository Add-in invokes this method when an MDO control object has been synchronized with its corresponding Visual Basic control. The method is invoked for each event sink object that has been registered for control-related Repository Add-in events.

Syntax

Sub ObjectSynchronized( MdoObject As Object, VBObject As Object )

The ObjectSynchronized method has these parts:

Part | Description
MdoObject | The MDO control object that has been synchronized.
VBObject | The corresponding Visual Basic control.


MdoProjectEvents Object

See Also Methods

To be able to respond to project-related Repository Add-in (RepVB) events, you must supply an MdoProjectEvents event sink object that implements these methods:

Methods

Method | Description
ObjectAdded | Invoked when an MdoProject object has been added to the repository.
ObjectChangedFileName | Invoked when the file associated with a Visual Basic project has been renamed.
ObjectRemoved | Invoked when an MdoProject object has been removed from the repository.
ObjectRenamed | Invoked when an MdoProject object has been renamed in the repository.
ObjectSynchronized | Invoked when an MDO project object has been synchronized with the corresponding Visual Basic project.

Remarks

To begin receiving events, register your MdoProjectEvents event sink object with the ConnectProjectEvents Repository Add-in method.


MdoProjectEvents ObjectAdded Method

The Repository Add-in invokes this method when an MdoProject object has been added to the repository. The method is invoked for each event sink object that has been registered for project-related Repository Add-in events.

Syntax

Sub ObjectAdded( MdoObject As Object, VBObject As Object )

The ObjectAdded method has these parts:

Part | Description
MdoObject | The MDO project object that has been added to the repository.
VBObject | The corresponding Visual Basic project.


MdoProjectEvents ObjectChangedFileName Method

The Repository Add-in invokes this method when the FileName property of an MdoProject object has been changed in the repository. The method is invoked for each event sink object that has been registered for project-related Repository Add-in events.

Syntax

Sub ObjectChangedFileName( MdoObject As Object, VBObject As Object, OldFileName As String )

The ObjectChangedFileName method has these parts:

Part | Description
MdoObject | The MDO project object whose corresponding Visual Basic project file has been renamed.
VBObject | The corresponding Visual Basic project.
OldFileName | The old file name for the Visual Basic project file.

Remarks

Do not confuse the name of an MDO project object with the name of the file that is associated with the corresponding Visual Basic project. If the object name is changed, the ObjectRenamed method is invoked, not this method.


MdoProjectEvents ObjectRemoved Method

The Repository Add-in invokes this method when an MdoProject object has been removed from the repository. The method is invoked for each event sink object that has been registered for project-related Repository Add-in events.

Syntax

Sub ObjectRemoved( MdoObject As Object, VBObject As Object )

The ObjectRemoved method has these parts:

Part | Description
MdoObject | The MDO project object that has been removed from the repository.
VBObject | The corresponding Visual Basic project.


MdoProjectEvents ObjectRenamed Method

The Repository Add-in invokes this method when the name of an MdoProject object has been changed in the repository. The method is invoked for each event sink object that has been registered for project-related Repository Add-in events.

Syntax

Sub ObjectRenamed( MdoObject As Object, VBObject As Object, OldName As String )

The ObjectRenamed method has these parts:

Part | Description
MdoObject | The MDO project object that has been renamed in the repository.
VBObject | The corresponding Visual Basic project.
OldName | The name that the MDO project object had before it was renamed.

Remarks

Do not confuse the name of an MDO project object with the name of the file that is associated with the corresponding Visual Basic project. If the file name is changed, the ObjectChangedFileName method is invoked, not this method.


MdoProjectEvents ObjectSynchronized Method

The Repository Add-in invokes this method when an MDO project object has been synchronized with its corresponding Visual Basic project. The method is invoked for each event sink object that has been registered for project-related Repository Add-in events.

Syntax

Sub ObjectSynchronized( MdoObject As Object, VBObject As Object )

The ObjectSynchronized method has these parts:

Part | Description
MdoObject | The MDO project object that has been synchronized.
VBObject | The corresponding Visual Basic project.


MdoReferenceEvents Object

See Also Methods

To be able to respond to reference-related Repository Add-in (RepVB) events, you must supply an MdoReferenceEvents event sink object that implements the following methods:

Methods

Method | Description
ObjectAdded | Invoked when an MdoTypeLib or MdoProjRef object has been added to the repository.
ObjectRemoved | Invoked when an MdoTypeLib or MdoProjRef object has been removed from the repository.

Remarks

To begin receiving events, register your MdoReferenceEvents event sink object with the ConnectReferenceEvents Repository Add-in method.


MdoReferenceEvents ObjectAdded Method

The Repository Add-in invokes this method when an MdoTypeLib or MdoProjRef object has been added to the repository. The method is invoked for each event sink object that has been registered for reference-related Repository Add-in events.

Syntax

Sub ObjectAdded(MdoObject As Object, VBObject As Object)

The ObjectAdded method has these parts:

Part | Description
MdoObject | The MDO reference object that has been added to the repository.
VBObject | The corresponding Visual Basic reference.


MdoReferenceEvents ObjectRemoved Method

The Repository Add-in invokes this method when an MdoTypeLib or MdoProjRef object has been removed from the repository. The method is invoked for each event sink object that has been registered for reference-related Repository Add-in events.

Syntax

Sub ObjectRemoved( MdoObject As Object, VBObject As Object )

The ObjectRemoved method has these parts:

Part | Description
MdoObject | The MDO reference object that has been removed from the repository.
VBObject | The corresponding Visual Basic reference.


MDO Model Automation Objects

The Microsoft Development Objects Model (MDO Model) is a tool information model; it describes kinds of data that Visual Basic stores in the repository as you create Visual Basic projects. These kinds of objects are defined in the MDO Model:

  • Visual Basic projects

  • Standard modules

  • Class modules

  • Form modules

  • MDI forms

  • Dialogs

  • Property pages

  • Custom controls

  • Document objects

  • Custom base class modules

  • Related documents

  • Resource files

  • Type libraries

  • External project references

Use the MDO Model Automation objects to access and manipulate repository information about Visual Basic projects.

Objects

MdoClassModule MdoRelatedDocument
MdoControl MdoResourceFile
MdoDesigner MdoStdModule
MdoMDIForm MdoTypeLibRef
MdoMSForm MdoUserControl
MdoProject MdoUserDocument
MdoProjectRef MdoVBForm
MdoPropertyPage ReposRoot Object Modifications


Accessing Automation Object Members

The MDO Model contains a number of Automation objects that support multiple interfaces. With each Automation object, one interface is defined to be the default interface, and the members (the properties, methods, and collections) that are attached to that interface are accessible via the standard Visual Basic mechanisms.

When accessing members that are attached to an interface that is not the default interface for an Automation object, a different access technique must be used. An additional reference to the object must be declared that explicitly calls for the non-default interface. The non-default interface members can then be accessed via the new object reference.

The following example illustrates how to access a collection that is attached to an interface that is not the default interface for an Automation object.

In this example, the repository object that represents the first control in a Visual Basic form is retrieved. MdoVBForm objects implement the IMdoControlContainer interface; this interface is not the default interface. The MdoControls collection is attached to the IMdoControlContainer interface. The MdoControls collection is the collection of controls that are contained in the form.

Dim vbFormObj    As MdoVBForm
Dim nonDefIfcObj As IMdoControlContainer
Dim controlObj   As MdoControl

'  Initialize the vbFormObj object by retrieving it
'  from the collection of components that are part
'  of a particular Visual Basic project.

Set nonDefIfcObj = vbFormObj
Set controlObj = nonDefIntObj.MdoControls(1)


ReposRoot Object Modifications

See Also Collections

The MDO Model modifies the repository root object of the repository to implement one additional repository interface: the IMpoProjectItemContainer interface. The IMpoProjectItemContainer interface maintains the relationship between a repository and the projects that it contains. The IMpoProjectItemContainer interface has one member: the Contents collection.

This modification enables you to use the repository root object as the starting point for navigating to MDO Model objects in the repository.

Collections

Collection | Description
Contents | The collection of all projects that are contained within a repository. This is not a default object member.


ReposRoot Contents Collection

The collection of all projects that are contained within a repository. This property is not attached to the default interface for the repository root object; it is attached to the IMpoProjectItemContainer interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | ProjectItemContainer-Contains-ProjectItems
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.Contents(index)

The Contents collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMpoProjectItemContainer as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.Contents.Count.

Remarks

The Contents collection is a heterogeneous collection; it can contain any kind of project item that implements the IMpoProjectItem interface. If you are using the collection to enumerate a particular kind of project item, be sure to check the Type property of each project item to skip over project items that are not of the desired type.

The name assigned to a project via a naming relationship of this collection is adorned to ensure that the name is unique among the collection of all Visual Basic projects in the collection. The adornment follows these rules:

  • If the project file is a network file, then the UNC name for the file is used as the name.

  • If the project file is a local file, then [computerName]filename is used as the name.

  • If the project file is unsaved, then [computerName]~processId~projectName is used as the name.


MdoClassModule Object

See Also Properties Collections

An MdoClassModule object represents a Visual Basic class module in the repository.

An MdoClassModule object is also a RepositoryObject. In addition to the members described here, MdoClassModule objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the MDO object.
FileName | Name of the file associated with the MDO object.
TimeStamp | The time the MDO object was last synchronized with the repository.

Collections

Collection | Description
MdoComponentProject | The collection of one Visual Basic project to which the component belongs. This is not a default object member.


MdoClassModule Description Property

Character string containing the description of the MDO object. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoClassModule object.


MdoClassModule FileName Property

Character string containing the name of the file that is associated with the MDO object. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoClassModule object.


MdoClassModule Timestamp Property

A Date value that specifies the time and date at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoClassModule object.


MdoClassModule MdoComponentProject Collection

The collection of one Visual Basic project to which the class module belongs.

This collection is not attached to the default interface for the MdoClassModule Automation object; it is attached to the IMdoComponent interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoComponentProject(index)

The MdoComponentProject collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoComponent as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoComponentProject.Count.


MdoControl Object

See Also Properties Collections

An MdoControl object represents a Visual Basic control in the repository.

An MdoControl object is also a RepositoryObject. In addition to the members described here, MdoControl objects also provide the members that are defined for repository objects.

Properties

Property | Description
ClassName | Name of the Visual Basic class module that defines this control.
Description | Description of the Visual Basic control.
Index | Index value for the Visual Basic control, if the control is a Visual Basic control array. If the control is not a control array, this property is set to negative one.
ProgID | Program identifier for the Visual Basic control.

Collections

Collection | Description
MdoControlContainer | The collection of one Visual Basic container that contains this Visual Basic control.
MdoControls | The collection of all Visual Basic controls that are contained within this Visual Basic control. This is not a default object member.
MdoISVControl | The collection of all Visual Basic controls that are contained within this Visual Basic control. This is not a default object member.


MdoControl ClassName Property

A character string that contains the name of the Visual Basic class module that defines this control. This is a read-only property.

Syntax

object.ClassName

The ClassName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoControl object.


MdoControl Description Property

A character string that contains the textual description that Visual Basic maintains for each control in a project. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoControl object.


MdoControl Index Property

A long integer that contains the index value for the Visual Basic control, if the control is a Visual Basic control array. If the control is not a control array, this property is set to negative one. This is a read-only property.

Syntax

object.Index

The Index property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoControl object.


MdoControl ProgID Property

A character string that contains the program identifier for the Visual Basic control. This is a read-only property.

Syntax

object.ProgID

The ProgID property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoControl object.


MdoControl MdoControlContainer Collection

The collection of one Visual Basic container that contains this Visual Basic control.

Collection Descriptor | Descriptor Value
Relationship Type | Component-Has-Controls
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | No
Case Sensitive Names | Not Applicable
Unique Names | Not Applicable

Syntax

object.MdoControlContainer(index)

The MdoControlContainer collection syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoControl object.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoControlContainer.Count.


MdoControl MdoControls Collection

MdoControls is the collection of all Visual Basic controls that are contained within this Visual Basic control. This collection does not recursively include controls that are contained within controls.

This collection is not attached to the default interface for the MdoControl Automation object; it is attached to the IMdoControlContainer interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Component-Has-Controls
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | No

Syntax

object.MdoControls(index)

The MdoControls collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoControlContainer as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoControls.Count.


MdoControl MdoISVControl Collection

MdoISVControl is the collection of one ISV control object that is associated with a particular Visual Basic control.

This collection is not attached to the default interface for the MdoControl Automation object; it is attached to the IMdoControlUsage interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Control-Uses-ISVControl
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | No
Case Sensitive Names | Not Applicable
Unique Names | Not Applicable

Syntax

object.MdoISVControl(index)

The MdoISVControl collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoControlUsage as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoISVControl.Count.


MdoDesigner Object

See Also Properties Collections

An MdoDesigner object represents a Visual Basic custom base class in the repository.

An MdoDesigner object is also a RepositoryObject. In addition to the members described here, MdoDesigner objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the MDO object.
FileName | Name of the file associated with the MDO object.
TimeStamp | The time the MDO object was last synchronized with the repository.

Collections

Collection | Description
MdoComponentProject | The collection of one Visual Basic project to which the component belongs. This is not a default object member.


MdoDesigner Description Property

The description of the MDO object. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoDesigner object.


MdoDesigner FileName Property

The name of the file that is associated with the MDO object. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoDesigner object.


MdoDesigner Timestamp Property

The time at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoDesigner object.


MdoDesigner MdoComponentProject Collection

The collection of one Visual Basic project to which the custom base class module belongs.

This collection is not attached to the default interface for the MdoDesigner Automation object; it is attached to the IMdoComponent interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoComponentProject(index)

The MdoComponentProject collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoComponent as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoComponentProject.Count.


MdoMDIForm Object

See Also Properties Collections

An MdoMDIForm object represents a multiple document interface (MDI) form in the repository.

An MdoMDIForm object is also a RepositoryObject. In addition to the members described here, MdoMDIForm objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the MDO object.
FileName | Name of the file associated with the MDO object.
TimeStamp | The time the MDO object was last synchronized with the repository.

Collections

Collection | Description
MdoComponentProject | The collection of one Visual Basic project to which the component belongs. This is not a default object member.
MdoControls | The collection of all Visual Basic controls that are contained within this MDI form. This is not a default object member.


MdoMDIForm Description Property

Character string containing the description of the MDO object. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoMDIForm object.


MdoMDIForm FileName Property

Character string containing the name of the file that is associated with the MDO object. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoMDIForm object.


MdoMDIForm Timestamp Property

A Date value that specifies the time and date at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoMDIForm object.


MdoMDIForm MdoComponentProject Collection

The collection of one Visual Basic project to which the MDI form belongs.

This collection is not attached to the default interface for the MdoMDIForm Automation object; it is attached to the IMdoComponent interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoComponentProject(index)

The MdoComponentProject collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoComponent as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoComponentProject.Count.


MdoMDIForm MdoControls Collection

MdoMDIForm is the collection of all Visual Basic controls that are contained within this MDI form. This collection does not recursively include controls that are contained within controls.

This collection is not attached to the default interface for the MdoMDIForm Automation object; it is attached to the IMdoControlContainer interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Component-Has-Controls
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | No

Syntax

object.MdoControls(index)

The MdoControls collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoControlContainer as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoControls.Count.


MdoMSForm Object

See Also Properties Collections

An MdoMSForm object represents a dialog form in the repository.

An MdoMSForm object is also a RepositoryObject. In addition to the members described here, MdoMSForm objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the MDO object.
FileName | Name of the file associated with the MDO object.
TimeStamp | The time the MDO object was last synchronized with the repository.

Collections

Collection | Description
MdoComponentProject | The collection of one Visual Basic project to which the component belongs. This is not a default object member.


MdoMSForm Description Property

Character string containing the description of the MDO object. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoMSForm object.


MdoMSForm FileName Property

Character string containing the name of the file that is associated with the MDO object. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoMSForm object.


MdoMSForm Timestamp Property

A Date value that specifies the time and date at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoMSForm object.


MdoMSForm MdoComponentProject Collection

The collection of one Visual Basic project to which the dialog form belongs.

This collection is not attached to the default interface for the MdoMSForm Automation object; it is attached to the IMdoComponent interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoComponentProject(index)

The MdoComponentProject collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoComponent as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoComponentProject.Count.


MdoProject Object

See Also Properties Collections

An MdoProject object represents a Visual Basic project in the repository.

An MdoProject object is also a RepositoryObject. In addition to the members described here, MdoProject objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the MDO object.
FileName | Name of the file associated with the MDO object.
TimeStamp | The time the MDO object was last synchronized with the repository.

Collections

Collection | Description
MdoComponents | The collection of all Visual Basic components that are contained within this project. This is not a default object member.
Containers | The collection of one repository root object that contains this Visual Basic project. This is not a default object member.
MdoReferences | The collection of all type libraries to which this Visual Basic project refers. This is not a default object member.


MdoProject Description Property

Character string containing the description of the MDO object. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoProject object.


MdoProject FileName Property

Character string containing the name of the file that is associated with the MDO object. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoProject object.


MdoProject Timestamp Property

A Date value that specifies the time and date at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoProject object.


MdoProject MdoComponents Collection

The collection of all Visual Basic components that are contained within this project.

This collection is not attached to the default interface for the MdoProject Automation object; it is attached to the IMdoProject interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoComponents(index)

The MdoComponents collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoProject as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoComponents.Count.


MdoProject Containers Collection

The collection of one repository root object that contains this Visual Basic project.

This collection is not attached to the default interface for the MdoProject Automation object; it is attached to the IMpoProjectItem interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | ProjectItemContainer-Contains-ProjectItems
Source Is Origin | No
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.Containers(index)

The Containers collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMpoProjectItem as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.Containers.Count.


MdoProject MdoReferences Collection

The collection of all type libraries to which this Visual Basic project refers.

This collection is not attached to the default interface for the MdoProject Automation object; it is attached to the IMdoProject interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-References
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoReferences(index)

The MdoReferences collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoProject as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoReferences.Count.


MdoProjectRef Object

See Also Properties Collections

A Visual Basic project can reference another Visual Basic project, if the second project exposes a type library. An MdoProjectRef object represents a Visual Basic project reference in the repository.

An MdoProjectRef object is also a RepositoryObject. In addition to the members described here, MdoProjectRef objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the type library that is exported by a Visual Basic project.
FileName | Name of the type library file associated with this project reference.
TimeStamp | The time this MdoProjectRef object was last synchronized with the repository.

Collections

Collection | Description
MdoReferenceProject | The collection of one Visual Basic project that references this type library.


MdoProjectRef Description Property

Character string containing a description of the type library that is exported by a Visual Basic project. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoProjectRef object.


MdoProjectRef FileName Property

Character string containing the name of the type library that is associated with this project reference. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoProjectRef object.


MdoProjectRef Timestamp Property

A Date value that specifies the time and date at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoProjectRef object.


MdoProjectRef MdoReferenceProject Collection

The collection of one Visual Basic project that references this type library.

This collection is not attached to the default interface for the MdoProjectRef Automation object; it is attached to the IMdoReference interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-References
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoReferenceProject(index)

The MdoReferenceProject collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoReference as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoReferenceProject.Count.


MdoPropertyPage Object

See Also Properties Collections

An MdoPropertyPage object represents a property page object in the repository.

An MdoPropertyPage object is also a RepositoryObject. In addition to the members described here, MdoPropertyPage objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the MDO object.
FileName | Name of the file associated with the MDO object.
TimeStamp | The time the MDO object was last synchronized with the repository.

Collections

Collection | Description
MdoComponentProject | The collection of one Visual Basic project to which the component belongs. This is not a default object member.
MdoControls | The collection of all Visual Basic controls that are contained within this property page. This is not a default object member.


MdoPropertyPage Description Property

Character string containing the description of the MDO object. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoPropertyPage object.


MdoPropertyPage FileName Property

Character string containing the name of the file that is associated with the MDO object. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoPropertyPage object.


MdoPropertyPage Timestamp Property

A Date value that specifies the time and date at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoPropertyPage object.


MdoPropertyPage MdoComponentProject Collection

The collection of one Visual Basic project to which the property page belongs.

This collection is not attached to the default interface for the MdoPropertyPage Automation object; it is attached to the IMdoComponent interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoComponentProject(index)

The MdoComponentProject collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoComponent as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoComponentProject.Count.


MdoPropertyPage MdoControls Collection

MdoPropertyPage is the collection of all Visual Basic controls that are contained within this property page. This collection does not recursively include controls that are contained within controls.

This collection is not attached to the default interface for the MdoPropertyPage Automation object; it is attached to the IMdoControlContainer interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Component-Has-Controls
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | No

Syntax

object.MdoControls(index)

The MdoControls collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoControlContainer as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoControls.Count.


MdoRelatedDocument Object

See Also Properties Collections

An MdoRelatedDocument object represents a document that is related to a Visual Basic project; for example, a functional specification or design document.

An MdoRelatedDocument object is also a RepositoryObject. In addition to the members described here, MdoRelatedDocument objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the related document.
FileName | Name of the related document file.
TimeStamp | The time this MDO object was last synchronized with the repository.

Collections

Collection | Description
MdoComponentProject | The collection of one Visual Basic project to which the document is related. This is not a default object member.


MdoRelatedDocument Description Property

Character string containing a description of the related document. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoRelatedDocument object.


MdoRelatedDocument FileName Property

Character string containing the name of the related document file. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoRelatedDocument object.


MdoRelatedDocument Timestamp Property

A Date value that specifies the time and date at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoRelatedDocument object.


MdoRelatedDocument MdoComponentProject Collection

The collection of one Visual Basic project to which the document is related.

This collection is not attached to the default interface for the MdoRelatedDocument Automation object; it is attached to the IMdoComponent interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoComponentProject(index)

The MdoComponentProject collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoComponent as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoComponentProject.Count.


MdoResourceFile Object

See Also Properties Collections

Resource files contain bitmaps, text strings, and other presentation data. An MdoResourceFile object represents a resource file in the repository.

An MdoResourceFile object is also a RepositoryObject. In addition to the members described here, MdoResourceFile objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the MDO object.
FileName | Name of the file associated with the MDO object.
TimeStamp | The time the MDO object was last synchronized with the repository.

Collections

Collection | Description
MdoComponentProject | The collection of one Visual Basic project to which the component belongs. This is not a default object member.


MdoResourceFile Description Property

Character string containing the description of the MDO object. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoResourceFile object.


MdoResourceFile FileName Property

Character string containing the name of the file that is associated with the MDO object. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoResourceFile object.


MdoResourceFile Timestamp Property

A Date value that specifies the time and date at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoResourceFile object.


MdoResourceFile MdoComponentProject Collection

The collection of one Visual Basic project to which the resource file belongs.

This collection is not attached to the default interface for the MdoResourceFile Automation object; it is attached to the IMdoComponent interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoComponentProject(index)

The MdoComponentProject collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoComponent as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoComponentProject.Count.


MdoStdModule Object

See Also Properties Collections

An MdoStdModule object represents a Visual Basic standard module in the repository.

An MdoStdModule object is also a RepositoryObject. In addition to the members described here, MdoStdModule objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the MDO object.
FileName | Name of the file associated with the MDO object.
TimeStamp | The time the MDO object was last synchronized with the repository.

Collections

Collection | Description
MdoComponentProject | The collection of one Visual Basic project to which the component belongs. This is not a default object member.


MdoStdModule Description Property

Character string containing the description of the MDO object. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoStdModule object.


MdoStdModule FileName Property

Character string containing the name of the file that is associated with the MDO object. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoStdModule object.


MdoStdModule Timestamp Property

A Date value that specifies the time and date at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoStdModule object.


MdoStdModule MdoComponentProject Collection

The collection of one Visual Basic project to which the standard module belongs.

This collection is not attached to the default interface for the MdoStdModule Automation object; it is attached to the IMdoComponent interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoComponentProject(index)

The MdoComponentProject collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoComponent as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoComponentProject.Count.


MdoTypeLibRef Object

See Also Properties Collections

An MdoTypeLibRef object represents an external type library that is referenced from a Visual Basic project.

An MdoTypeLibRef object is also a RepositoryObject. In addition to the members described here, MdoTypeLibRef objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the type library that is represented by this MDO object.
FileName | Name of the type library file associated with this MDO object.
TimeStamp | The time this MdoTypeLibRef object was last synchronized with the repository.

Collections

Collection | Description
MdoReferenceProject | The collection of one Visual Basic project that references this type library.


MdoTypeLibRef Description Property

Character string containing a description of the type library that is represented by this MDO object. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoTypeLibRef object.


MdoTypeLibRef FileName Property

Character string containing the name of the type library file that is associated with this MDO object. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoTypeLibRef object.


MdoTypeLibRef Timestamp Property

A Date value that specifies the time and date at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoTypeLibRef object.


MdoTypeLibRef MdoReferenceProject Collection

The collection of one Visual Basic project that references this type library.

This collection is not attached to the default interface for the MdoTypeLibRef Automation object; it is attached to the IMdoReference interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-References
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoReferenceProject(index)

The MdoReferenceProject collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoReference as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoReferenceProject.Count.


MdoUserControl Object

See Also Properties Collections

An MdoUserControl object represents a custom control in the repository. You can build your own custom controls, or use controls that are supplied by an independent software vendor (ISV).

An MdoUserControl object is also a RepositoryObject. In addition to the members described here, MdoUserControl objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the MDO object.
FileName | Name of the file associated with the MDO object.
TimeStamp | The time the MDO object was last synchronized with the repository.

Collections

Collection | Description
MdoComponentProject | The collection of one Visual Basic project to which the component belongs. This is not a default object member.
MdoControls | The collection of all Visual Basic controls that are contained within this user control. This is not a default object member.


MdoUserControl Description Property

Character string containing the description of the MDO object. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoUserControl object.


MdoUserControl FileName Property

Character string containing the name of the file that is associated with the MDO object. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoUserControl object.


MdoUserControl Timestamp Property

A Date value that specifies the time and date at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoUserControl object.


MdoUserControl MdoComponentProject Collection

The collection of one Visual Basic project to which the user control belongs.

This collection is not attached to the default interface for the MdoUserControl Automation object; it is attached to the IMdoComponent interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoComponentProject(index)

The MdoComponentProject collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoComponent as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoComponentProject.Count.


MdoUserControl MdoControls Collection

MdoUserControl is the collection of all Visual Basic controls that are contained within this user control. This collection does not recursively include controls that are contained within controls.

This collection is not attached to the default interface for the MdoUserControl Automation object; it is attached to the IMdoControlContainer interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Component-Has-Controls
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | No

Syntax

object.MdoControls(index)

The MdoControls collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoControlContainer as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoControls.Count.


MdoUserDocument Object

See Also Properties Collections

An MdoUserDocument object represents a document object in the repository.

An MdoUserDocument object is also a RepositoryObject. In addition to the members described here, MdoUserDocument objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the MDO object.
FileName | Name of the file associated with the MDO object.
TimeStamp | The time the MDO object was last synchronized with the repository.

Collections

Collection | Description
MdoComponentProject | The collection of one Visual Basic project to which the component belongs. This is not a default object member.
MdoControls | The collection of all Visual Basic controls that are contained within this user document. This is not a default object member.


MdoUserDocument Description Property

Character string containing the description of the MDO object. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoUserDocument object.


MdoUserDocument FileName Property

Character string containing the name of the file that is associated with the MDO object. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoUserDocument object.


MdoUserDocument Timestamp Property

A Date value that specifies the time and date at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoUserDocument object.


MdoUserDocument MdoComponentProject Collection

The collection of one Visual Basic project to which the user document belongs.

This collection is not attached to the default interface for the MdoUserDocument Automation object; it is attached to the IMdoComponent interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoComponentProject(index)

The MdoComponentProject collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoComponent as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoComponentProject.Count.


MdoUserDocument MdoControls Collection

MdoUserDocument is the collection of all Visual Basic controls that are contained within this user document. This collection does not recursively include controls that are contained within controls.

This collection is not attached to the default interface for the MdoUserDocument Automation object; it is attached to the IMdoControlContainer interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Component-Has-Controls
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | No

Syntax

object.MdoControls(index)

The MdoControls collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoControlContainer as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoControls.Count.


MdoVBForm Object

See Also Properties Collections

An MdoVBForm object represents a Visual Basic form module in the repository.

An MdoVBForm object is also a RepositoryObject. In addition to the members described here, MdoVBForm objects also provide the members that are defined for repository objects.

Properties

Property | Description
Description | Description of the MDO object.
FileName | Name of the file associated with the MDO object.
TimeStamp | The time the MDO object was last synchronized with the repository.

Collections

Collection | Description
MdoComponentProject | The collection of one Visual Basic project to which the component belongs. This is not a default object member.
MdoControls | The collection of all Visual Basic controls that are contained within this Visual Basic form. This is not a default object member.


MdoVBForm Description Property

Character string containing the description of the MDO object. This is a read-only property.

Syntax

object.Description

The Description property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoVBForm object.


MdoVBForm FileName Property

Character string containing the name of the file that is associated with the MDO object. This is a read-only property.

Syntax

object.FileName

The FileName property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoVBForm object.


MdoVBForm Timestamp Property

A Date value that specifies the time and date at which the MDO object was last synchronized with the repository. This is a read-only property.

Syntax

object.TimeStamp

The TimeStamp property syntax has these parts:

Part | Description
object | An object expression that evaluates to an MdoVBForm object.


MdoVBForm MdoComponentProject Collection

The collection of one Visual Basic project to which the Visual Basic form belongs.

This collection is not attached to the default interface for the MdoVBForm Automation object; it is attached to the IMdoComponent interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Syntax

object.MdoComponentProject(index)

The MdoComponentProject collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoComponent as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoComponentProject.Count.


MdoVBForm MdoControls Collection

MdoVBForm is the collection of all Visual Basic controls that are contained within this Visual Basic form. This collection does not recursively include controls that are contained within controls.

This collection is not attached to the default interface for the MdoVBForm Automation object; it is attached to the IMdoControlContainer interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor | Descriptor Value
Relationship Type | Component-Has-Controls
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | No

Syntax

object.MdoControls(index)

The MdoControls collection syntax has these parts:

Part | Description
object | An object expression; evaluates to an object that implements IMdoControlContainer as the default interface.
index | An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.MdoControls.Count.


MDO Model Classes

The Microsoft Development Objects Model (MDO Model) is a tool information model; it describes kinds of data that Visual Basic stores in the repository as you create Visual Basic projects. These kinds of objects are defined in the MDO Model:

  • Visual Basic projects

  • Standard modules

  • Class modules

  • Form modules

  • MDI forms

  • Dialogs

  • Property pages

  • Custom controls

  • Document objects

  • Custom base class modules

  • Related documents

  • Resource files

  • Type libraries

  • External project references

Use the MDO Model classes to access and manipulate repository information about MDO objects.

Classes

MdoClassModule | MdoRelatedDocument
MdoControl | MdoResourceFile
MdoDesigner | MdoStdModule
MdoMDIForm | MdoTypeLibRef
MdoMSForm | MdoUserControl
MdoProject | MdoUserDocument
MdoProjectRef | MdoVBForm
MdoPropertyPage | ReposRoot Class Modifications


MdoClassModule Class

Interfaces

An instance of the MdoClassModule class represents a Visual Basic class module in the repository.

Interfaces

Interface | Description
IMdoComponent | Maintains the relationship between a Visual Basic component and the Visual Basic project to which it belongs.
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoControl Class

Interfaces

An instance of the MdoControl class represents a Visual Basic control.

Interfaces

Interface | Description
IMdoControl | Maintains information about a Visual Basic control.
IMdoControlContainer | Maintains the relationship between a Visual Basic control container and the Visual Basic controls that it contains.
IMdoControlUsage | Maintains the relationship between a Visual Basic control and the corresponding custom control.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoDesigner Class

Interfaces

An instance of the MdoDesigner class represents a Visual Basic custom base class in the repository.

Interfaces

Interface | Description
IMdoComponent | Maintains the relationship between a Visual Basic component and the Visual Basic project to which it belongs.
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoMDIForm Class

Interfaces

An instance of the MdoMDIForm class represents a multiple document interface (MDI) form in the repository.

Interfaces

Interface | Description
IMdoComponent | Maintains the relationship between a Visual Basic component and the Visual Basic project to which it belongs.
IMdoControlContainer | Maintains the relationship between a Visual Basic control container and the controls that it contains.
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoMSForm Class

Interfaces

An instance of the MdoMSForm class represents a dialog form in the repository.

Interfaces

Interface | Description
IMdoComponent | Maintains the relationship between a Visual Basic component and the Visual Basic project to which it belongs.
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoProject Class

Interfaces

An instance of the MdoProject class represents a Visual Basic project in the repository.

Interfaces

Interface | Description
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IMdoProject | Maintains the relationships between a Visual Basic project and its components and type library references.
IMpoProjectItem | Maintains the relationship between a Visual Basic project and its containing repository.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoProjectRef Class

Interfaces

A Visual Basic project can reference another Visual Basic project, if the second project exposes a type library. An instance of the MdoProjectRef class represents a Visual Basic project reference in the repository.

Interfaces

Interface | Description
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IMdoReference | Maintains the relationship between two Visual Basic projects, where one project references the other project.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoPropertyPage Class

Interfaces

An instance of the MdoPropertyPage class represents a property page object in the repository.

Interfaces

Interface | Description
IMdoComponent | Maintains the relationship between a Visual Basic component and the Visual Basic project to which it belongs.
IMdoControlContainer | Maintains the relationship between a Visual Basic control container and the Visual Basic controls that it contains.
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoRelatedDocument Class

Interfaces

An instance of the MdoRelatedDocument class represents a document that is related to a Visual Basic project; for example, a functional specification or design document.

Interfaces

Interface | Description
IMdoComponent | Maintains the relationship between a Visual Basic component and the Visual Basic project to which it belongs.
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoResourceFile Class

Interfaces

Resource files contain bitmaps, text strings, and other presentation data. An instance of the MdoResourceFile class represents a resource file in the repository.

Interfaces

Interface | Description
IMdoComponent | Maintains the relationship between a Visual Basic component and the Visual Basic project to which it belongs.
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoStdModule Class

Interfaces

An instance of the MdoStdModule class represents a Visual Basic standard module in the repository.

Interfaces

Interface | Description
IMdoComponent | Maintains the relationship between a Visual Basic component and the Visual Basic project to which it belongs.
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoTypeLibRef Class

Interfaces

An instance of the MdoTypeLibRef class represents an external type library that is referenced from one or more Visual Basic projects.

Interfaces

Interface | Description
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IMdoReference | Maintains the relationship between a type library and the Visual Basic projects that reference it.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoUserControl Class

Interfaces

An instance of the MdoUserControl class represents a custom control in the repository. You can build your own custom controls, or use controls that are supplied by an independent software vendor (ISV).

Interfaces

Interface | Description
IMdoComponent | Maintains the relationship between a Visual Basic component and the Visual Basic project to which it belongs.
IMdoControlContainer | Maintains the relationship between a Visual Basic control container and the Visual Basic controls that it contains.
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoUserDocument Class

Interfaces

An instance of the MdoUserDocument class represents a document object in the repository.

Interfaces

Interface | Description
IMdoComponent | Maintains the relationship between a Visual Basic component and the Visual Basic project to which it belongs.
IMdoControlContainer | Maintains the relationship between a Visual Basic control container and the Visual Basic controls that it contains.
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


MdoVBForm Class

Interfaces

An instance of the MdoVBForm class represents a Visual Basic form module in the repository.

Interfaces

Interface | Description
IMdoComponent | Maintains the relationship between a Visual Basic component and the Visual Basic project to which it belongs.
IMdoControlContainer | Maintains the relationship between a Visual Basic control container and the Visual Basic controls that it contains.
IMdoModelItem | Maintains properties that are common to many different types of MDO Model objects.
IRepositoryItem | Manages repository objects and relationships.
IRepositoryObject | Retrieves repository object identifiers.
IRepositoryObjectStorage | Creates and loads repository objects.


ReposRoot Class Modifications

The MDO Model modifies the ReposRoot class of the repository to implement one additional repository interface; the IMpoProjectItemContainer interface. With this interface, you can use the repository root as the starting point for navigating to MdoProject objects in the repository.

Added Interfaces

Interface | Description
IMpoProjectItemContainer | Maintains the relationship between a repository root object and the projects that it contains.


IMdoComponent Interface

The IMdoComponent Interface maintains the relationship between a Visual Basic component and the Visual Basic project that contains it.

When to Use

Use the IMdoComponent Interface to determine the Visual Basic project to which a particular Visual Basic component belongs.

Collections

Collection | Description
MdoComponentProject | The collection of one Visual Basic project to which the component belongs.


IMdoComponent MdoComponentProject Collection

The collection of one Visual Basic project to which the component belongs.

Dispatch Identifier: DISPID_ComponentProject (53)

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes


IMdoControl Interface

The IMdoControl Interface maintains properties and collection information for Visual Basic control objects.

When to Use

Use the IMdoControl Interface to access information about a particular control.

Properties

Property | Description
ClassName | Name of the Visual Basic class module that defines this control.
Description | Description of the Visual Basic control.
Index | Index value for the Visual Basic control, if the control is a Visual Basic control array. If the control is not a control array, this property is set to negative one.
ProgID | Program identifier for the Visual Basic control.

Collections

Collection | Description
MdoControlContainer | The collection of one Visual Basic container that contains this Visual Basic control.


IMdoControl ClassName Property

The name of the Visual Basic class module that defines this control.

Dispatch Identifier: DISPID_PropClassName (112)

Property Data Type: character string


IMdoControl Description Property

The brief textual description that Visual Basic maintains for each control in a project.

Dispatch Identifier: DISPID_PropCtlDescription (114)

Property Data Type: character string


IMdoControl Index Property

Index value for the Visual Basic control, if the control is a Visual Basic control array. If the control is not a control array, this property is set to negative one.

Dispatch Identifier: DISPID_PropIndex (111)

Property Data Type: long


IMdoControl ProgID Property

The program identifier for the Visual Basic control.

Dispatch Identifier: DISPID_PropProgId (113)

Property Data Type: character string


IMdoControl MdoControlContainer Collection

The collection of one Visual Basic container that contains this Visual Basic control.

Dispatch Identifier: DISPID_ControlContainer (57)

Collection Descriptor | Descriptor Value
Relationship Type | Component-Has-Controls
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | No
Case Sensitive Names | Not Applicable
Unique Names | Not Applicable


IMdoControlContainer Interface

The IMdoControlContainer Interface maintains the relationship between a Visual Basic container and the Visual Basic controls that it contains.

When to Use

Use the IMdoControlContainer Interface to determine the set of Visual Basic controls that are contained by a particular Visual Basic container.

Collections

Collection | Description
MdoControls | The collection of all Visual Basic controls that are contained within this Visual Basic container.


IMdoControlContainer MdoControls Collection

The collection of all Visual Basic controls that are contained within this Visual Basic container. This collection does not recursively include controls that are contained within controls.

Dispatch Identifier: DISPID_Controls (56)

Collection Descriptor | Descriptor Value
Relationship Type | Component-Has-Controls
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | No


IMdoControlUsage Interface

The IMdoControlUsage Interface maintains the relationship between a Visual Basic control and an independent software vendor (ISV) control. If a particular control is not implemented as an ISV control, this collection is empty.

When to Use

Use the IMdoControlUsage Interface to determine the ISV control that is associated with a Visual Basic control.

Collections

Collection | Description
MdoISVControl | The collection of one ISV control object.


IMdoControlUsage MdoISVControl Collection

The collection of one ISV control object that is associated with a particular Visual Basic control.

Dispatch Identifier: DISPID_ISVControls (102)

Collection Descriptor | Descriptor Value
Relationship Type | Control-Uses-ISVControl
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | No
Case Sensitive Names | Not Applicable
Unique Names | Not Applicable


IMdoISVControl Interface

The IMdoISVControl Interface maintains the relationship between an independent software vendor (ISV) control and its corresponding Visual Basic control object.

When to Use

Use the IMdoISVControl Interface to determine the Visual Basic control that is associated with a particular ISV control.

Collections

Collection | Description
MdoControlUsage | The collection of one Visual Basic control that uses this ISV control.


IMdoISVControl MdoControlUsage Collection

The collection of one Visual Basic control that uses this ISV control.

Dispatch Identifier: DISPID_ISVUsage (59)

Collection Descriptor | Descriptor Value
Relationship Type | Control-Uses-ISVControl
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | No
Case Sensitive Names | Not Applicable
Unique Names | Not Applicable


IMdoModelItem Interface

The IMdoModelItem Interface maintains properties that are common to many different types of MDO Model objects.

When to Use

Use the IMdoModelItem Interface to access information about a particular MDO object.

Properties

Property | Description
Description | Description of the MDO object.
FileName | Name of the file that is associated with the MDO object.
TimeStamp | The time at which the MDO object was last synchronized with the repository.


IMdoModelItem Description Property

The description of the MDO object.

Dispatch Identifier: DISPID_PropDescription (102)

Property Data Type: character string


IMdoModelItem FileName Property

The name of the file that is associated with the MDO object.

Dispatch Identifier: DISPID_FileName (103)

Property Data Type: character string


IMdoModelItem Timestamp Property

The time at which the MDO object was last synchronized with the repository.

Dispatch Identifier: DISPID_Timestamp (104)

Property Data Type: DATE


IMdoProject Interface

The IMdoProject Interface maintains the relationships between a Visual Basic project and:

  • The Visual Basic components that it contains.

  • Its references, if there are any, to external type libraries.

When to Use

Use the IMdoProject Interface to determine:

  • The set of Visual Basic components that are contained by a project.

  • The references that a Visual Basic project has, if any, to type libraries.

Collections

Collection | Description
MdoComponents | The collection of all Visual Basic components that are contained within this project.
MdoReferences | The collection of all type libraries to which this Visual Basic project refers.


IMdoProject MdoComponents Collection

The collection of all Visual Basic components that are contained within this project.

Dispatch Identifier: DISPID_Components (52)

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-Components
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes


IMdoProject MdoReferences Collection

The collection of all type libraries to which this Visual Basic project refers.

Dispatch Identifier: DISPID_References (54)

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-References
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes


IMdoReference Interface

The IMdoReference Interface maintains the relationship between a type library and the Visual Basic project that references it. The type library may represent another Visual Basic project, or any other executable component that exposes a type library.

When to Use

Use the IMdoReference Interface to determine which Visual Basic project references a particular type library.

Collections

Collection | Description
MdoReferenceProject | The collection of one Visual Basic project that references this type library.


IMdoReference MdoReferenceProject Collection

The collection of one Visual Basic project that references this type library.

Dispatch Identifier: DISPID_ReferenceProject (55)

Collection Descriptor | Descriptor Value
Relationship Type | Project-Has-References
Source Is Origin | No
Minimum Collection Size | One
Maximum Collection Size | One
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes


IMpoProjectItemContainer Interface

A project consists of containers and items. Some items are also containers, and contain other items. The IMpoProjectItemContainer interface maintains the relationship between a container and the items it contains.

For Visual Basic projects, the repository root object is modified to support this interface. The project items that are contained by the repository root object are projects. So the IMpoProjectItemContainer interface maintains the relationship between a repository and the projects that it contains.

When to Use

Use the IMpoProjectItemContainer interface to determine the set of project items that are contained within a project item container. For Visual Basic projects, use this interface to determine the set of projects that are contained within a repository.

Collections

Collection | Description
Contents | The collection of all project items that are contained within a particular project item container.


IMpoProjectItemContainer Contents Collection

The collection of all project items that are contained within a particular project item container.

Dispatch Identifier: DISPID_Contents (70)

Collection Descriptor | Descriptor Value
Relationship Type | ProjectItemContainer-Contains-ProjectItems
Source Is Origin | Yes
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes

Remarks

The Contents collection is a heterogeneous collection; it can contain any kind of project item that implements the IMpoProjectItem interface. If you are using the collection to enumerate a particular kind of project item, be sure to check the type (via the get_Type method) of each project item to skip over project items that are not of the desired type.

The name assigned to a project via a naming relationship of this collection is adorned to ensure that the name is unique among the collection of all Visual Basic projects in the collection. The adornment follows these rules:

  • If the project file is a network file, then the UNC name for the file is used as the name.

  • If the project file is a local file, then [computerName]filename is used as the name.

  • If the project file is unsaved, then [computerName]~processId~projectName is used as the name.


IMpoProjectItem Interface

The IMpoProjectItem interface maintains the relationship between a project item and the project item container that contains it.

For Visual Basic projects, the IMpoProjectItem interface maintains the relationship between a project and the repository that contains it.

When to Use

Use the IMpoProjectItemContainer interface to determine the project item container that contains a particular project item. For Visual Basic projects, use this interface to determine the repository that contains a particular project.

Collections

Collection | Description
Containers | The collection of all project item containers that are contain a particular project item.


IMpoProjectItem Containers Collection

The collection of all project item containers that contain a particular project item.

Dispatch Identifier: DISPID_Containers (71)

Collection Descriptor | Descriptor Value
Relationship Type | ProjectItemContainer-Contains-ProjectItems
Source Is Origin | No
Minimum Collection Size | Zero
Maximum Collection Size | Many
Sequenced Collection | No
Deletes Propagated | Yes
Destinations Named | Yes
Case Sensitive Names | No
Unique Names | Yes


MDO Model SQL Schema

SQL tables are used by the repository to store the instance information for tool information models. SQL schema modifications are automatically performed when you create or extend a tool information model.

Normally, one table is created for each interface that is defined in the repository. The table contains the instance data for persistent properties that are attached to the interface. One column in the table is created for each property. If an interface is defined that has no member properties, a table is not created.

You can construct a SQL query to extract specific tool information from the repository. You need to be familiar with the SQL schema for a tool information model to build such a query.

The MDO Model is a tool information model, and therefore, its instance information is stored in SQL tables. In the MDO Model (without any extensions), there are only two interfaces that have member properties: the IMdoModelItem interface and the IMdoControl interface. The SQL table names for these two interfaces are shown below.

Interface | SQL Table Name
IMdoControl | TblMdoControl
IMdoModelItem | TblMdoModelItem


TblMdoControl SQL Table

This SQL table contains the properties that are attached to the IMdoControl interface of the MDO Model. The IntID column is the primary key for this table.

Column Name | Data Type | Description
IntID | 8 byte SQL_BINARY | The internal identifier for the control object.
CtlIx | SQL_INTEGER | The index value for the control, if it is a member of a control array. Otherwise, this field is not used.
ClassName | SQL_VARCHAR | The class name of the control.
ProgID | SQL_VARCHAR | The Visual Basic programmatic identifier for the control.
Description | SQL_VARCHAR | A description of the control.


TblMdoModelItem SQL Table

This SQL table contains the properties that are attached to the IMdoModelItem interface of the MDO Model. The IntID column is the primary key for this table.

Column Name | Data Type | Description
IntID | 8 byte SQL_BINARY | The internal identifier for the model item.
Description | SQL_VARCHAR | A description of the model item.
FileName | SQL_LONG_VARCHAR | The name of the file that is associated with this model item.
tsTimeStamp | SQL_TIMESTAMP | The time at which the MDO object was last synchronized with the repository.


Topic Not Found

No matching topic was found. Some possible reasons and remedies are as follows:

  • The file (.chm) that contains the destination topic is not in the expected location.

    Remedy: Rerun the MSDN Library Setup.

  • The file (.chm) that contains the current topic or destination topic is out-of-date and the link is no longer valid.

    Remedy: Install the latest version of the MSDN Library.

  • The MSDN Library CD is not in the CD-ROM drive.

    Remedy: Insert the MSDN Library CD into the CD-ROM drive.