ActiveX Controls that Disappear on HTML Pages
ActiveX Controls that Disappear on HTML Pages (Readme)

Using HTML tools to insert certain ActiveX controls may cause the control not to appear when the HTML page is viewed in a browser. Controls for which this problem occurs include the MSChart and ImageList controls. Tools that create this problem include ActiveX Control Pad.

To remedy this, check the VBSscript generated by the tool, and delete the Data attribute from the Object tag.

To insert an MSChart Control using ActiveX Control Pad

1	Start ActiveX Control Pad.

2	On the Edit menu, click Insert ActiveX Control.

3	In the Insert ActiveX Control dialog box, double-click Microsoft Chart Control.

4	Close the ActiveX Control Editor.

5	When you close the editor, you will notice a large amount of text has been added to the HTML. Scroll up through the text until you find the beginning of the Object tag, which will resemble the text below:

<OBJECT ID="MSChart1" WIDTH=100 HEIGHT=51

 CLASSID="CLSID:31291E80-728C-11CF-93D5-0020AF99504A"

 DATA="DATA:application/x-oleobject;BASE64,gB4pMYxyzxGT1QAgr5lQSiFDNBIIAAAAVgoAACsFAAC9ZAYFAQAAAAAA//// ...

6	To make the MSChart control display properly, you must delete all of the text for the Data attribute. When you do this, the HTML will resemble the code below:

<OBJECT ID="MSChart1" WIDTH=100 HEIGHT=51

 CLASSID="CLSID:31291E80-728C-11CF-93D5-0020AF99504A"

</OBJECT>

Design time properties must be set at run time

Unfortunately, deleting the Data attribute also means you cannot set any design-time properties for the control, because the design-time properties have also been deleted. This means you must set all properties at run time. For controls such as the ImageList control, this means you cannot load pictures into the control at design time. Instead, you must use VBScript to load the pictures. Moreover, the LoadPicture function (needed to load graphics into the ImageList control) is not available in VBScript. To load pictures into the ImageList control, you must instead create your own control that exposes a public method. That method should then invoke the LoadPicture function.


GetSelectedText Method Replaced by GetSelection Method
GetSelectedText Method Replaced by GetSelection Method (Readme)

The GetSelectedText method mentioned in the topic "Manipulating the IDE with Add-ins" has been replaced by the GetSelection Method.

In the following sentence, found under the "Code Panel" heading, substitute "GetSelectedText" with "GetSelection":

"You can use the GetSelectedText method to copy selected code into the Windows clipboard."


Upgrade ActiveX Controls Automatically from Project Properties Dialog (Readme)

The Upgrade ActiveX Controls option on the General Tab of the Project Properties dialog box is not adequately documented. In brief, the option allows you to specify if the project will upgrade controls automatically if new versions are available. If the option is checked (the default), ActiveX controls will be automatically updated if newer versions are present. If the option is unchecked, whenever the project is loaded, a dialog box will prompt you to upgrade the controls.


Component Manager not included (ReadMe)
Component Manager Not Included in VB5 (ReadMe)

The Component Manager is not included in this version of Visual Basic.


URL for the VB feedback Web page (ReadMe)
Feedback Web Page URL (ReadMe)

The correct location of the Visual Basic feedback web page is www.microsoft.com/support/feedback/mswish.htm. The URL is incorrectly listed in the topic "Visual Basic Online Links."


Control Class (ReadMe)

Visual Basic provides the Control class as a generic variable type for controls. When you declare a variable As Control, you can assign it a reference to any control. You cannot create an instance of the Control class.

Note   Accessing properties and methods of a control is faster if you use a variable declared with the same type as the control (for example, As TreeView or As CommandButton), because Visual Basic can use early binding. Visual Basic must use late binding to access properties and methods of a control assigned to a variable declared As Control.


MaskColor Property (UserControl Object) (ReadMe)

Returns or sets the color that determines the transparent region of the bitmap assigned to the MaskPicture property of a UserControl object whose BackStyle property is set to 0 (Transparent).

Syntax

object.MaskColor [= color]

The MaskColor property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
color	A value or constant that determines the color to be used as a mask, as described in Settings.
Settings

Visual Basic uses the Microsoft Windows operating environment red-green-blue (RGB) color scheme. The settings for color are:

Setting	Description
RGB colors	Colors specified by using the Color palette or by using the RGB or QBColor functions in code.
Remarks

When a bitmap is assigned to the MaskPicture property of a UserControl whose BackStyle property is set to 0 (Transparent), the control becomes transparent wherever it is covered by areas of the bitmap that match the MaskColor property.

Mouse events that occur over the transparent areas are received by the container or by controls that would otherwise be covered by the UserControl.

If there is no bitmap assigned to the MaskPicture property, or if the BackStyle property of the UserControl is not set to 0 (Transparent), then setting the MaskColor property has no effect.

For further details, see the MaskPicture property of the UserControl object.

Note   Although MaskColor accepts the system color constants listed in the Visual Basic (VB) object library in the Object Browser, as described in Help for the BackColor and ForeColor properties, this is only useful if the MaskPicture bitmap contains a system color.


MaskPicture Property (UserControl Object) (ReadMe)

Returns or sets the bitmap that, combined with the MaskColor property, determines the transparent and visible regions of a UserControl object whose BackStyle property is set to 0 (Transparent).

Syntax

object.MaskPicture [= picture]

The MaskPicture property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
picture	A graphic image of one of the types described in Settings.
Settings

The settings for picture are:

Setting	Description
Nothing	(Default) No picture. At design time, highlight the property value and press the Delete key; "(None)" will appear in the Properties window. At run time, assign the return value of the LoadPicture function with no filename, or use the Set statement to assign the value Nothing to the property.
(Bitmap, DIB, GIF, or JPEG)	Specifies an image-type bitmap. At design time, you can use the Properties window to enter a string expression specifying a file containing a graphic. At run time, you can set this property using a Picture object, using another object's Picture property, or using the LoadPicture function on an image-type bitmap file.
Important   This feature is supported only for image-type bitmaps, such as GIF, JPEG, and DIB. It is not supported for Windows metafiles, icons, or cursors.

Remarks

When a bitmap is assigned to the MaskPicture property of a UserControl whose BackStyle property is set to 0 (Transparent), the control becomes transparent wherever it is covered by areas of the bitmap that match the MaskColor property.

Mouse events that occur over the transparent areas are received by the container or by controls that would otherwise be covered by the UserControl.

The non-transparent parts of the MaskPicture bitmap are painted with the color specified by the UserControl's BackColor property. These areas, which need not be contiguous, define the clipping region for drawing on the UserControl. That is, any drawing that is done on the surface of the UserControl is clipped to the non-transparent parts of the MaskPicture bitmap.

Important   The bitmap assigned to the MaskPicture property is only used to define the transparent region and clipping region for the UserControl. The bitmap is never displayed. To display a bitmap on top of the clipping region defined by MaskPicture and MaskColor, you can assign the bitmap to the Picture property of the UserControl, or draw it on the UserControl using PaintPicture in the UserControl's Paint event.

You can create an animated clipping region for your control by drawing on a hidden PictureBox, and transferring the resulting image to the MaskPicture property of the UserControl.

Note   When you set the MaskPicture property at design time, the graphic is saved and loaded with the .ctl and .ctx files that define the UserControl. If you make the project into a control component (.ocx file), the file contains the image. When you load a graphic at run time, by contrast, the graphic isn't saved with the component.

For more information, see "Giving Your Control a Transparent Background," in "Building ActiveX Controls."


ParentControlsType Property (ReadMe)

Returns or sets a value that determines whether the ParentControls collection contains references to controls incorporating the container's Extender object, or to controls without the Extender.

Syntax

object.ParentControlsType [= type]

The ParentControlsType property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	An integer or named constant that indicates what the ParentControls collection will return.
Settings

The settings for type are as follows:

Constant	Value	Description
vbExtender	0	(Default) The ParentControls collection will return the control and extender.
vbNoExtender	1	The ParentControls collection will return the control itself, without the extender.
Remarks

The ParentControls collection allows you to access the other controls on a container where your control has been sited. The default is for the references to these controls to include the Extender object properties and methods provided by the container.

Some containers, such as Internet Explorer, provide an extender object that cannot be used by Visual Basic. In such a container, Visual Basic will raise an error when you attempt to access the objects in ParentControls using the default settings.

You can access the controls on an HTML page in Internet Explorer by setting ParentControlsType to vbNoExtender, so that ParentControls will contain references to the controls themselves, without the extender properties and methods.

Because the property can be set at run time, you can switch back and forth between vbExtender and vbNoExtender depending on what container your control is sited on. If necessary, you can alternate between the settings in containers that support both.


Parent Property (UserControl Object) (ReadMe)

Returns a reference to the container object on which the control is sited. Not available at design time and read-only at run time.

Syntax

object.Parent

The Parent property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
Remarks

The Parent property returns a reference to the container object even when the UserControl's AmbientProperties object does not provide a Parent property. You can use the Parent property of the UserControl object to access the container's object model.

By testing TypeName(Parent), you can determine what container your control is sited on.

•	Excel returns the workbook.

•	Word returns the document.

•	Powerpoint returns the presentation.

•	VB4/VB5 returns the form.

•	Internet Explorer returns an object whose Script property returns the IOmWindow object.

For example, in Internet Explorer, the following code will change the background color of the HTML page on which your control is located:

Parent.Script.get_document.bgColor = "Blue"

More information on the Internet Explorer Scripting Object Model can be found on Microsoft’s Web site.

Important   Always use late binding for calls to the Internet Explorer Scripting Object Model. Using early binding will almost certainly cause compatibility problems in the future, while late binding will always work. In other containers, you can use early binding.


Current Public/Instancing property values are not valid in this type of project
Current Public/Instancing property values are not valid in this type of project (Readme)

This error occurs when you add a file to an existing project, and that project type doesn't support the setting of the Instancing or Public property of the module the file contains.

For example, you will get this error if you take a class module whose Instancing property is set to MultiUse from an ActiveX Exe project, and add it to a Standard Exe project. This is because Standard Exe projects only support the value Private for the Instancing property.

Similarly, this error will occur if you add a UserControl whose Public property is True to a Standard Exe project, because controls in Standard Exe projects can only be private.

You don't need to take any action as a result of this error, because Visual Basic automatically resets the Instancing or Public property to a value supported by the project type.


Deleting a property with Control Interface Wizard doesn't update PropertyPage
Deleting a property with Control Interface Wizard doesn't update PropertyPage (Readme)

The ActiveX Control Interface Wizard can be used to add and delete properties in existing ActiveX controls. If a control has a property page that displays a particular property, and you use the wizard to remove the property declaration from the control, the PropertyPage object will not be updated to reflect this.

As a result, the next time the property page is run, an error will occur. To avoid this error, you must manually remove all references to the deleted property from the PropertyPage object that used to display it.


Description of interfaces that can be used with Implements (ReadMe)

When you create interfaces for use with the Implements statement, you can use Visual Basic or any tool that creates type libraries, such as the MkTypLib utility or the Microsoft Interface Definition Language (MIDL) compiler.

Most classes created in Visual Basic define interfaces that work with Implements. When you create an interface by defining a class in Visual Basic, simply make sure that none of the properties or methods have underscores in their names.

Interfaces created with tools other than Visual Basic must follow certain restrictions in order to work with Implements. The following list includes most of these restrictions.

•	Interface methods cannot have underscores in their names.

•	Only [in] and [in,out] params are allowed — [out] only params are not allowed, and [lcid] parameters are not allowed.

•	Method return types must be HRESULT, in order for errors to be propagated. You will not see the HRESULT in Visual Basic, as it is translated into an exception (raised error). To create a method that will have a return type when used in Visual Basic code, you must use [out, retval] on the final parameter.

•	Only Automation data types may be used:

VB	MIDL
Integer	short
Long	long
Single	float
Double	double
Byte	unsigned char
Boolean	boolean or VARIANT_BOOL
String	BSTR
Variant	VARIANT
Date	DATE
Currency	CURRENCY or CY
Object	IDispatch *
IUnknown	IUnknown
•	SAFEARRAY parameters containing any of the simple data types from the list above are allowed.

•	Enum parameters are allowed.

•	Dispinterface interface pointers are allowed as parameters.

•	Dual interface pointers are allowed as parameters.

•	CoClass parameters are allowed.

•	If you're creating a type library in order to make a system interface usable with Implements, you must not use the [oleautomation] or [dual] attributes. Type libraries must be registered before you can add them to the Visual Basic References dialog box, and registering a type library with the [oleautomation] attribute will overwrite information required to remote the system interface. THIS WILL CAUSE OTHER APPLICATIONS ON THE SYSTEM TO FAIL. The [dual] attribute must not be used because it implies [oleautomation].

Note   It may be useful to specify [oleautomation] while creating the typelib, in order to enforce correct types, but the type library must be built without the attribute before you reference it through the Visual Basic References dialog box.

•	Unsigned long and unsigned short parameters are not included in the data type table, and are not allowed.

•	User-defined data types (structures) are not allowed as parameters.

•	Interfaces must be based on IUnknown or IDispatch. The full vtable (after IUnknown/IDispatch) must be described in a single interface.

•	Restricted vtable entries are ignored and do not prevent the Implements statement from working.

•	Most pointers cannot be passed as [in] parameters. (For example, as a remoting optimization, a C++ interface can declare a parameter as [in] VARIANT* pVar. This will not work with Implements.) An [in] parameter can be a BSTR, a pointer to an interface (for example, IDispatch*), or a SAFEARRAY pointer (SAFEARRAYs are always passed as pointers). An [in,out] parameter can be a pointer to an Automation type, or a double pointer to an interface (for example, IDispatch**). (Note that 'ByVal As String' in Visual Basic maps to [in] BSTR. You cannot use [in] BSTR* with Visual Basic.)

•	Implements does not work with dispinterfaces.

For more information, see "Polymorphism," in "Programming with Objects" and also "Providing Polymorphism by Implementing Interfaces," in “General Principles of Component Design.”


Errata: Conditional Compilation Code Example (ReadMe)

In "Using Conditional Compilation," in "More About Programming," the example code is incorrect. The first #Else should be a #ElseIf:

#If conFrenchVersion Then

' <code specific to the French language version>.

#ElseIf conGermanVersion then

' <code specific to the German language version>.

#Else

' <code specific to other versions>.

#End If


Error: 'Item' could not be loaded (ReadMe)

In addition to other causes, this error occurs when you attempt to add a file containing an existing Form, MDIForm, UserControl, PropertyPage, or UserDocument to a project in which you have selected the Unattended Execution option (accessed from the General tab of the Project Properties dialog box).

A project marked for unattended execution cannot support any form of user interaction, so the module types it can contain are severely restricted.


Instancing property default varies depending on project type (ReadMe)

Online Help states that the default value of the Instancing property is Private. This is only true for class modules in Standard Exe projects.

When you insert a new class module into an ActiveX Exe project or an ActiveX DLL project, the default value of the Instancing property is MultiUse. When you insert a new class module into an ActiveX Control project, the default value of the Instancing property is PublicNotCreatable.


Modal dialog or message box blocks events when debugging (ReadMe)

The development environment cannot raise events while a modal form or message box is displayed, because of potential conflicts in the debugger. Therefore, events are suppressed until the modal form or message box is dismissed.

Important   Suppression of events only happens in the development environment. Once a project is compiled, events will be raised even when a modal form or message box is displayed.

Example scenarios in which this can occur:

•	A form with a Timer control on it is running in the development environment. Selecting Options from the Tools menu will open the Options dialog box, which is modal. Until the dialog is dismissed, the Timer control's Timer event will not be raised.

•	An instance of a UserControl with a Timer control on it is placed on a form at design time. (The timer may be used to make the control appear animated; this effect can occur even in design mode, because controls can execute code at design time.) Selecting Add Class Module from the Project menu will open the Add Class Module dialog, which is modal. The Timer control's Timer event will be suppressed until the dialog is dismissed.

•	A UserDocument contains a Timer control, and a command button that displays a message box. If the UserDocument is being debugged using Internet Explorer, pressing the button to display the message box will cause the Timer control's Timer event to be suppressed until the message box is dismissed.


The VBIDE can't provide multiple instances of a SingleUse class (Readme)

The error occurs under the following conditions:

•	A project that is running in the development environment contains a class whose Instancing property is set to SingleUse.

•	A client project has previously created an instance of this SingleUse class.

•	A client (it may be the same client, or another client) attempts to create a second instance of the SingleUse class.

The error occurs because a SingleUse object can only be created once per instance of the component that provides it. (That is, once an ActiveX Exe project is compiled, creating multiple instances of its SingleUse class will run multiple instances of the Exe component.) However, when the project is in the development environment, it is not possible to start a second instance of the project.

This is a restriction on debugging projects that provide SingleUse classes.

Note   The error will occur even if the first client has released its instance of the SingleUse class. This is because a compiled Exe cannot provide a second instance of a SingleUse class, even after the first has been released.


Version 'item3' of 'item1' is not registered. The control will be... (ReadMe)

In addition to other causes, this message may occur from time to time when you are authoring ActiveX controls with Visual Basic. The message is harmless, requires no action on your part, and can be avoided as described below.

The message appears under the following circumstances:

•	You compile your ActiveX control project to an .ocx file.

•	You create a test project in another copy of Visual Basic and use the Controls tab of the Components dialog box (accessed from the Project menu) to select the .ocx file, which then appears in the Toolbar.

•	You place an instance of a control on a form, and then save the test project.

•	At some later date, you recompile the .ocx file.

•	When you open the test project, the message will appear during project load.

The message occurs when using the default Version Compatibility setting (Project Compatibility, on the Components tab of the Project Properties dialog box). The Project Compatibility setting causes the type library version number of a control component (.ocx file) to be incremented each time you compile it. This is to allow easy upgrades of released controls.

Normally, when a new release of an .ocx file is installed on a developer's computer, it does not replace the old version (usually because the file names are different). When the developer opens an existing project that used the old version of the control, Visual Basic asks whether the control instances in the project should be upgraded to the new version.

In this case, there is no old version of the .ocx file, so Visual Basic automatically upgrades the controls, and provides a message informing you of this.

Note   The type library version number is not in any way associated with the file version number you set using the Make tab of the Project Properties dialog box. The numbers displayed in this message are the decimal equivalents of the hexadecimal type library version numbers stored in the Windows Registry.

The message requires no action on your part in this scenario, because Visual Basic automatically incorporates the new type library version number into the test project.

You can avoid the message in several ways:

•	Instead of compiling your .ocx file and testing it with a separate copy of Visual Basic, you can include both the ActiveX control project and the Standard Exe test project in a project group, and run them in the same copy of the development environment. This is described in "Creating an ActiveX Control”.

•	Use the Component tab of the Project Properties dialog box to select Binary Compatibility with an earlier version of your .ocx file. The drawback to this is that if you later make a version incompatible change to your control (such as removing a property), you will get Version Compatibility warning messages when you compile.

Note   If you're creating a new versions of an existing control, and you intend to make incompatible changes in the interface, this may not be your best option; Project Compatibility is better in that case, because it preserves the ability of developer's to upgrade the controls in their projects to your new version. You should change the file name, however, so that the new .ocx file doesn't overwrite the old.

For more information on type library versions and the Version Compatibility feature, see "Version Compatibility" in “Debugging, Testing, and Deploying Components.”


Require License Key only applies to ActiveX Control projects (ReadMe)

Help for the General Tab on the Project Properties dialog box states that the Require License Key option "Enables licensing for a project that produces ActiveX Components (automation servers, user controls, and ActiveX controls."

This is incorrect. Licensing is only supported for ActiveX Control projects (that is, projects that compile to .ocx files). Therefore the option is disabled for all other project types.


A property or method call included a reference to a private object, either as an argument or as a return value. (Readme)

You included a reference to a private object as an argument or return value in a property or method call.

Private objects should never be passed outside a project. The following, all of which are prohibited, are possible causes for the error:

•	A client invoked a property or method of an out-of-process component and attempted to pass a reference to a private object as one of the arguments. A client invoked a property or method of an out-of-process component and the component attempted to return a reference to a private object, or to assign such a reference to a ByRef argument.

•	An out-of-process component has invoked a call-back method on its client and attempted to pass a reference to a private object

•	An out-of-process component attempted to pass a reference to a private object as an argument of an event it was raising.

•	A client attempted to assign a private object reference to a ByRef argument of an event it was handling.

Notes   Although Visual Basic prevents you from passing references to private objects across processes, there are some cases in which Visual Basic can't detect this error and thus can't prevent it. Private objects are not designed to be used outside your project. If you pass them to a client, you may jeopardize program stability and cause incompatibility with future versions of Visual Basic. If you need to pass a private class of your own to a client, set the Instancing property to a value other than Private.

The error will always appear in the client, even if it is the fault of the server code.

For additional information, select the item in question and press F1.


Application not found. Looking for object with CLSID: |1. (Readme)

Visual Basic could not find the application you are trying to use. This is a system error. If this problem persists, re-install Visual Basic or the affected application, and try again.


Application was launched but it didn't register a class factory. Looking for object with CLSID: |1. (Readme)

The application was opened but a class factory was not registered. This is a system error. If this problem persists, re-install Visual Basic or the affected application, and try again.


Class is not registered. Looking for object with CLSID |1. (Readme)
Class is not registered. Looking for object with CLSID: |1. (Readme)

The class was not registered. This is a system error. If this problem persists, re-install Visual Basic and try again.


Class not found. (Readme)

Visual Basic could not find the class that you specified. This is a system error. If this problem persists, re-install Visual Basic or the affected application, and try again.


Class object cannot be determined. Looking for object CLSID: |1. (Readme)

Visual Basic could not find the class object you indicated. This is a system error. If this problem persists, re-install Visual Basic or the affected application, and try again.


DLL for class not found. Looking for object with CLSID: |1. (Readme)

Visual Basic could not find the DLL for the class that you specified. This is a system error. If this problem persists, re-install Visual Basic or the affected application, and try again.


Error in the DLL. Looking for object with CLSID: |1. (Readme)

You have received a system error. If this problem persists, re-install Visual Basic or the affected application, and try again.


Interface not registered. Looking for object with CLSID: |1. (Readme)

The interface was not registered. This is a system error. If this problem persists, re-install Visual Basic or the affected application, and try again.


Invalid class string. Looking for object with ProgID. (Readme)

The class string you are trying to use is invalid. This is a system error. If this problem persists, re-install Visual Basic or the affected application, and try again.


Object is not registered. Looking for object with CLSID: |1. (Readme)

The object you are trying to use is not registered. This is a system error. If this problem persists, re-install Visual Basic or the affected application, and try again.


Unexpected error. (Readme)

You have received a system error. If this problem persists, re-install Visual Basic or the affected application, and try again.


Using the Comment Block and Uncomment Block Commands

The Comment Block and Uncomment Block commands can be found on the Edit toolbar. Use these commands to make a multiple lines of code into a comment block or to remove the comment characters from a block of code:

1.	Add the Edit toolbar either by choosing the Toolbars command on the Edit menu and then choosing Edit; or by placing your cursor on the toolbar, clicking the right mouse button, and then choosing Edit.

2.	Open a code module and highlight the code you want to use to create a comment block or the code from which you want to remove comment characters.

3.	Click the Comment Block or Uncomment Block button on the Edit toolbar.

Either the code will be moved into a block and the comment characters added or it will be separated into individual pieces of code and the comment characters removed from it.


Wrong OS or OS version for application. Looking for object with CLSID: |1. (Readme)

You are using an incompatible operating system or the wrong version of the operating system. Install a compatible operating system and try again.


Controls Collection
Controls Collection (Readme)

A collection whose elements represent the controls on a container. The Controls collection has a Count property which specifies the number of controls in the collection, and an Item method which returns a member of the collection.

Syntax

object.Controls.Count

object.Controls(index)

The Controls collection syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
Index	An integer with a range from 0 to Controls.Count - 1.
Note   If the container is a Visual Basic module, such as a Form or UserControl, you don't have to supply the object expression when writing code within the module. If the container is a compiled ActiveX control, such as the ToolBar control, you must always supply the object expression.

Remarks

The Controls collection enumerates loaded controls on a container. For example, you might use it to change the BackColor property of all the Label controls on a container.

You can use the TypeOf keyword with the If statement, or the TypeName function, to determine the type of a control in the Controls collection.

Note   The Controls collection is not a member of the Visual Basic Collection class. It has a smaller set of properties and methods than a Collection object, and you cannot create instances of it.


Error Constants (ComCtl32)
Error Constants (ComCtl32) (Readme)

Constant	Value	Description
cc2InvalidProcedureCall	5	Invalid procedure call
cc2BadFileNameOrNumber	&H34	Bad file name or number
cc2FileNotFound	&H35	File not found
cc2InvalidPropertyValue	&H17C	Invalid property value
cc2SetNotSupportedAtRuntime	&H17E	Property cannot be set at run time
cc2SetNotSupported	&H17F	Property is read-only
cc2InvalidObjectUse	&H1A9	Invalid object use
cc2WrongClipboardFormat	&H1CD	Specified format doesn't match format of data
cc2DataObjectLocked	&H2A0	DataObject formats list may not be cleared or expanded outside of the OLEStartDrag event
cc2ExpectedAnArgument	&H2A1	Expected at least one argument.
cc2RecursiveOleDrag	&H2A2	Illegal recursive invocation of OLE drag and drop
cc2FormatNotByteArray	&H2A3	Non-intrinsic OLE drag and drop formats used with SetData require Byte array data.  GetData may return more bytes than were given to SetData.
cc2DataNotSetForFormat	&H2A4	Requested data was not supplied to the DataObject during the OLESetData event.
cc2InconsistentObject	&H8BA6	Internal state of the control has become corrupted
cc2ErrorDuringSet	&H8BA7	Unable to set property
cc2ErrorOpeningVideo	&H8BA8	Unable to open AVI file
cc2ErrorPlayingVideo	&H8BA9	Unable to play AVI file
cc2NoValidBuddyCtl	&H8BAA	BuddyControl property must be set first
cc2VideoNotOpen	&H8BAB	Must open AVI file first
cc2AutoBuddyNotSet	&H8BAC	AutoBuddy not set, no potential buddy controls found
cc2ErrorStoppingVideo	&H8BAD	Error trying to stop playing AVI file
cc2ErrorClosingVideo	&H8BAE	Error closing open AVI file
cc2CantStopAutoPlay	&H8BAF	Stop method does not effect AutoPlay property
cc2BuddyNotASibling	&H8BB0	BuddyControl must be a separate control within the same container
cc2NoUpDownAsBuddy	&H8BB1	An UpDown control cannot be buddied with another UpDown control


OLEDrop Constants (ComCtl32)
OLEDrop Constants (ComCtl32) (Readme)

Constant	Value	Description
cc2OLEDropEffectNone	0	No OLE drag/drop operation has taken place/would take place.
cc2OLEDropEffectCopy	1	A mask to indicate that a copy has taken place/would take place.
cc2OLEDropEffectMove	2	A mask to indicate that a move has take place/would take place.
cc2OLEDropEffectScroll	-2147483648 (&H80000000)	A mask to indicate that the drop target window has scrolled/would scroll.


OLEDropEffect Constants (ComCtl32)
OLEDropEffect Constants (ComCtl32) (Readme)

Constant	Value	Description
cc2OLEDropManual	1	Accepts an OLE drag/drop under programmatic control only.
cc2OLEDropNone	0	Accepts no OLE drag/drop operations.


Using the WithEvents keyword
Using the WithEvents keyword (Readme)

The WithEvents keyword is explained as part of certain declarative statements (Dim, Public, and Private). However, in order to use the statement, you need to understand the following two statements as well:

Event statement

RaiseEvent statement


Coercion of Byte and String types
Coercion of Byte and String types (Readme)

In many previous versions of basic, strings were used to hold what were really arrays of byte data. Visual Basic now has a Byte data type, so this is unnecessary. Such strings can be assigned to resizable arrays of bytes. An array of bytes can similarly be assigned to a variable-length string. Be aware that coercion between types requires creation of temporary variables and arrays that may affect performance. Also, on Unicode platforms (all 32-bit operating systems), the same string contains twice as many bytes as on non-Unicode (16-bit operating systems) platforms.


LinkedWindows Property
LinkedWindows Property (Readme)

The LinkedWindows property is an accessor property (i.e., a property that returns an object of the same type as the property name).


Properties Property (Readme)

The Properties property is an accessor property (i.e., a property that returns an object of the same type as the property name).


References Property (Readme)

The References property is an accessor property (i.e., a property that returns an object of the same type as the property name).


Errors in callback procedures
Errors in callback procedures (Readme)

A callback procedure is a procedure within your program that Windows can call at certain times. You enable Windows to call this procedure by passing a reference to the procedure as an argument in an API call that is preceded by the AddressOf operator. Since the caller of a callback is not within your program, it is important that an error in the callback procedure not be propagated back to the caller. You can accomplish this by place the On Error Resume Next statement at the beginning of the callback procedure.


Reserved Property and Method names
Reserved Property and Method names (Readme)

The following names cannot be used as property or method names because they belong to the underlying IUnknown and IDispatch interfaces: QueryInterface, AddRef, Release, GetTypeInfoCount, GetTypeInfo, GetIDsOfNames, Invoke. Using these names causes a compilation error.


Clarification for DateAdd function
Clarification for DateAdd function (Readme)

The format of the return value for DateAdd is determined by the Control Panel settings, not by the format that is passed in the date argument.


Additional VBA (Language) Error messages
Additional VBA (Language) Error messages (Readme)

The following error messages appear in some VBA helpfiles, but may be missing from others:

Cannot handle events for the object specified

Events for this object could not be handled.

Unexpected compiler error

This error occurs when a completely unanticipated error occurs during compilation.

Invalid use of base class name

You cannot use the name of a base class by itself. This error has the following causes and solutions:

•	You tried to use the name of a base class by itself without making clear that you were trying to access the base class' default member.

Place the base-class name within parentheses to indicate you want to access the default member.

•	You used the base-class name in an expression but the member you were trying to access was ambiguously specified.

Use a disambiguator ( for example, an exclamation point) between the base-class name and the member you are interested in.

•	You used the base-class name in a Set statement as though it contained a reference to the class.

Use the base-class name to retrieve a reference for example, using GetObject.

Invalid Event Name

Event procedure names are constructed by joining the object name to the event name with an underscore. This error has the following causes and solutions:

•	You used an underscore as part of the event name.

Remove the underscore from the event name.

Event Not Found

An event specified in a RaiseEvent statement must correspond to a defined event. This error has the following causes and solutions:

•	You specified a name in a RaiseEvent statement, but the event definition cannot be found.

Make sure the event name is spelled correctly.

For additional information, select the item in question and press F1.

Search string must be specified

You have to enter a string when searching in the object browser. This error has the following causes and solutions:

•	You initiated a search in the Object Browser, but didn't specify text to search for.

Enter a search string.

Cannot display specified name because it is hidden

Some names exist in a type library, but are marked as hidden. This error has the following causes and solutions:

•	You specified a name that is in the type library, but it is marked as hidden.

You cannot normally view hidden type library members. Choose Show Hidden Members on the object browser context menu to make hidden members visible. You can then view the member information.

Cannot jump to specified type because it is in the specified library, which is not currently referenced

This error has the following causes and solutions:

•	You tried to specify a type in a library that isn't reference within the project.

Set a reference to the type library through the References dialog.

Invalid inside Enum

Not all types are valid within an enumeration definition. This error has the following causes and solutions:

•	You tried to specify a string or some other invalid type as the value of an Enum member.

The constant expression used to specify an Enum member must evaluate to type Long or another Enum type.

This component doesn't support the set of events (Error 459)

Not every component supports client sinking of events. This error has the following cause and solution:

•	You tried to use a WithEvents variable with a component that can't work as an event source for the specified set of events. For example, you may be sinking events of an object, then create another object that Implements the first object. Although you might think you could sink the events from the implemented object, that isn't automatically the case. Implements only implements an interface for methods and properties.

You can't sink events for a component that doesn't source events.


ClassName Property (ReadMe)

Returns the class name of a control.

Syntax

object.ClassName

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Bug with Testing Procedures with the Immediate Window topic
Bug with Testing Procedures with the Immediate Window topic (ReadMe)

In the topic “Testing Procedures with the Immediate Window” the documentation incorrectly states: “If Option Explicit is in effect… any variables you enter in the Immediate window must already be declared within the current scope.” The Option Explicit statement has no effect on variables entered in the Immediate window. Note however that any variables entered in the Immediate window that have not been previously declared as a specific type will be treated as Variants.


Compile error in Form Unload sample code
Compile error in Form Unload sample code (ReadMe)

In the topic “More About Forms” the sample code is incorrect and will cause a compile error if copied into a project.

The incorrect code is:

Private Sub Form_Unload()

Dim i As Integer

'Loop through the forms collection and unload

'each form.

For i = 0 To Forms.Count - 1

Unload Forms(i)

Next

End Sub

In this example, the “Cancel as Integer” parameter is missing from the Form_Unload declaration; also the forms must be unloaded in reverse order to avoid a “subscript out of range” error.

The correct code is:

Private Sub Form_Unload (Cancel As Integer)

Dim i As Integer

'Loop through the forms collection and unload

'each form.

For i = Forms.Count - 1 To 0 Step -1

Unload Forms(i)

Next

End Sub


Missing Documentation: ValueTips and Bookmarks
Missing Documentation: ValueTips and Bookmarks (ReadMe)

The documentation fails to mention two new features in VB5: ValueTips in the Immediate window, and Bookmarks in the Code Editor.

ValueTips are similar to ToolTips except that they display the current value when the mouse is held over a variable or object property in the Code Window in Break mode. The display of ValueTips is limited to variables and objects that are currently in scope.

ValueTips are also available in the Immediate window in Break mode. Unlike the Code Editor, the Immediate window will display values for object properties regardless of scope if a fully qualified object name is provided. For example, a ValueTip would always be displayed for Form1.Text1.Width, but not for Text1.Width unless Text1 was currently in scope.

Bookmarks are a new feature of the Code Editor that can be used to mark lines of code so that you can easily return to them later. Commands to toggle bookmarks on or off as well as to navigate existing bookmarks are available from the Edit, Bookmarks menu item, or from the Edit toolbar


Palette Property - Additional Information
Palette Property - Additional Information (ReadMe)

The Palette Property topic in online Help states “You can use a .dib, .gif, or .pal file to set the palette as well as .bmp files.” This is incorrect. Only .dib. .gif, and .bmp files can be assigned to the Palette property. Assigning a .pal file will cause a run-time error 481: “Invalid picture”.


Using Relative Palette Colors
Using Relative Palette Colors (ReadMe)

When designing for 256 color displays, some colors may appear dithered. This can make text and other graphic elements difficult to read. By specifying a relative palette color, Visual Basic will display the closest undithered approximation of a specified color on 256 color displays while still displaying the exact color at higher color depths.

To force Visual Basic to use the closest solid, rather than dithered, color for a given property, put a 2 in the high order byte of the color property. For example, to force a form’s background to be a solid light orange you could use the following code:

Private Function PaletteRGB(RGB As Long) As Long

PaletteRGB = &H02000000 Or RGB

End Function

If you set this at design time:

Form1.BackColor = &H00C0E0FF& 	‘dithered light orange

And add the following to the Form_Click event:

Private Sub Form_Click()

Form1.BackColor = PaletteRGB(Form1.BackColor)

End Sub

At run-time when the form is clicked the backcolor will change to a solid, rather than dithered, shade. It is now using the closest color out of the halftone palette. This effect may not be visible on systems running at a color depth greater than 256 colors.


Programming with Objects - Error in Code Sample (ReadMe)

In the topic “Putting Property Procedures to Work for You” in “Programming with Objects” there is an error in the code example demonstrating that the arguments of paired property procedures must match.

It states:

The Property Get declaration must use arguments with the same name and data type as the arguments in the Property Let Procedure.

Public Property Let Things(ByVal X As Integer…

The “Let” in this line of code should be replaced with “Get”.


Setting Combo Box Styles at Run Time (ReadMe)

Combo Box styles are read-only and can only be set at design time. In “Using Visual Basic’s Standard Controls,” it incorrectly states that Combo Box styles can be set at both design and run time. If you attempt to set the style of a Combo Box at run time, you will receive an error message.


Setup Wizard Looking for "User" or "Kernel"
Setup Wizard Looking for "User" or "Kernel" (ReadMe)

If you create an application that includes conditional compilation (for example, "#If Win 16 Then") and 16 bit declares, the Setup Wizard will query you with "Locate KERNEL" or "Locate USER." This occurs when you use the following declaration:

Declare Function GetVersion16 Lib "Kernel" Alias "GetVersion" () As Long

To avoid this situation, change the declaration from "Kernel" to "Kernel.dll." This results in the line below:

Declare Function GetVersion16 Lib "Kernel.dll" Alias "GetVersion" () As Long


Hide Method Fails When Repeated in Modal Forms
Hide Method Fails When Repeated in Modal Forms (ReadMe)

When closing a modal form that has been opened from another modal form, the following code worked in previous versions of Visual Basic:

Me.Hide

Me.Hide ' This will now cause an error.

In Visual Basic 5.0 this code will now fail on the second "Me.Hide." You can substitute "Me.Hide" with "Me.Visible = False," as shown below:

Me.Visible = False

Me.Visible = False ' No error raised.


Don't Share a Property Page Between Projects if a UserControl Is on It
Don't Share a Property Page Between Projects if a UserControl Is on It (ReadMe)

Although it is possible to place a UserControl on a property page, and to share that property page between projects (within the same Project group), you will not be able to update the control on the property page. For this reason, you should avoid sharing a property page that has a UserControl object on it. The specific scenario where this happens is shown below:

To share a Property Page with a UserControl on it

1	On the File menu, click New Project.

2	Double-click the ActiveX Control icon.

3	On the Project menu, click Add Property Page.

4	Double-click the Property Page icon to add it to the project.

5	Repeat steps 2-4 to add a second control project and property page to the project group.

6	On the File menu, click Save Project Group. When prompted to overwrite the control project and property page, click OK.

7	Close all of the designers in the project group except for Project2's PropertyPage1 designer.

8	On the Toolbox, double-click UserControl1 to add it to the PropertyPage.

If you attempt to close the property page designer, you will get an error. Further efforts to modify the UserControl object will also fail.


ListView Tooltips Cause ZOrder Problems When Used in Addins
ListView Tooltips Cause ZOrder Problems When Used in Addins (ReadMe)

When using the ListView control as part of an Addin, some problems with zorder may be caused by Tooltips. The following conditions must all be true in order to manifest these problems:

•	The ListView control is used in an Addin.

•	The ListView control's View property is set to Large Icons.

•	The Tooltip is long enough to wrap.

When these problems occur, they can only be remedied by shutting down Visual Basic.


Access95 Won't Run After Uninstalling VB4
Access95 Won't Run After Uninstalling VB4 (ReadMe)

If you uninstall Visual Basic version 4 after installing Access 95, Access will no longer work. This problem will not occur with Visual Basic version 5. To get Access running again, re-register the old version of DAO (DAO3032.DLL).

Use REGSVR32.EXE to re-register DAO. REGSVR32.EXE is usually found in the \tools\regutils folder, and DAO3032.DLL is usually in the \program files\common files\microsoft shared\dao folder.  The command line to re-register DAO is:

cd "c:\program files\common files\microsoft shared\dao"

regsvr32 dao3032.dll


Setup Fails On NT 4.0 With FastFind Installed (ReadMe)

When installing Visual Basic on a machine running Windows NT 4.0 and the FastFind feature of Microsoft Office 97, setup may be unable to register Msjet35.dll. This will cause setup to fail.

Temporarily disabling or removing FastFind may allow setup to succeed.


ShowTips Property is Read-Only (ReadMe)

The correct syntax for this property is

object.ShowTips

Syntax in the Help topic incorrectly indicates the value can be set at run-time.


Remove MV141KN.OCX From Your System Before Installing (ReadMe)

If you were a beta user of VB5, remove MV141KN.OCX from your system before installing the released product


GPF when toggling folders if UserDoc and Designers are present (ReadMe)
GPF When Toggling Folders if UserDocument Object and Designers are Present (ReadMe)

If you create an ActiveX EXE project and insert a UserDocument object and then an ActiveX designer, and then toggle the folders in the Project window from one state to another, the reference to the UserDocument disappears from the Project window.

In many cases, this can lead to a General Protection Fault (GPF), because Visual Basic searches through the Project window in order to save project items. If you toggle the folders and then attempt to save your project or shut down Visual Basic, and a project item that Visual Basic expects to be present in the project window disappears from the window—such as a UserDocument object—you will receive a GPF.


IStudio/ActiveX ScriptPad cannot change fonts using Visual Basic-created Font property (ReadMe)
IStudio/ActiveX ScriptPad Can't Change Fonts Using VB-created Font Property (ReadMe)

If you create a Font property in Visual Basic, then attempt to use it to change a font using ScriptPad or IStudio, the font is not changed. To illustrate the problem:

1.	Start Visual Basic and create a new ActiveX Control project.

1.	Use the Control Interface wizard to create a Font property. (Map it to UserControl.Font).

1.	Add On Error Resume Next to the WriteProperties event.

1.	Make sure that the ProcID for the Font property is set to "Font".

1.	Build the ActiveX control.

2.	Start ScriptPad or IStudio.

3.	Place the control on the HTML page.

4.	Change the font shown in the property sheet.

5.	Close the designer.

Notice that the font is not changed.

This problem occurs because the WriteProperties event:

Call PropBag.WriteProperty("Font", UserControl.Font, _

 Ambient.Font)

never writes any font information because the Font object is equivalent to Ambient.Font, as demonstrated by the following code:

MsgBox IIF(Font IS Ambient.Font, "The Font object is _

 identical to Ambient.Font", "Different Objects")

The following code illustrates the problem:

'MappingInfo=UserControl,UserControl,-1,Font

Public Property Get Font() As Font

    Set Font = UserControl.Font

End Property

Public Property Set Font(ByVal New_Font As Font)

    Set UserControl.Font = New_Font

    PropertyChanged "Font"

End Property

'Initialize Properties for User Control

Private Sub UserControl_InitProperties()

    Set Font = Ambient.Font

End Sub

'Load property values from storage

Private Sub UserControl_ReadProperties(PropBag As _

 PropertyBag)

    Set Font = PropBag.ReadProperty("Font", _

 Ambient.Font)

End Sub

'Write property values to storage

Private Sub UserControl_WriteProperties(PropBag As _

 PropertyBag)

    Call PropBag.WriteProperty("Font", Font, _

 Ambient.Font)

End Sub

UserControl_InitProperties sets the font to be the ambient font. When you set the property in the ActiveX control pad property sheet, it doesn't create a new Font object and set it (like the property browser does). Instead, it inserts new values into the existing Font object. This means that the property Set/Let isn't called when the property is changed; instead only Get is called.

Workaround:

To work around this problem, change the code in UserControl_InitProperties from:

Set Font = Ambient.Font

to:

Set Font.Name = Ambient.Font.Name

Set Font.Size = Ambient.Font.Size

(etc.)


Property page erroneously referenced in Activate and DeActivate events (ReadMe)
PropertyPage Object Does Not Support Activate and Deactivate Events (ReadMe)

The Activate and Deactivate events erroneously include the PropertyPage object in their Applies To lists.


Visual Basic 5.0 Bidirectional Features (ReadMe)

Visual Basic is bidirectional (also known as "BiDi")-enabled, but there is no mention of this on the product packaging or in any other printed documentation. Online documentation is contained in a separate help file included only with 32-bit bidirectional platforms.

"Bidirectional" is a generic term used to describe software products that support Arabic and other languages which are written right-to-left. More specifically, bidirectional refers to the product ability to manipulate and display text for both left-to-right and right-to-left languages. For example, displaying a sentence containing words written in both English and Arabic requires bidirectional capability.

Microsoft Visual Basic 5.0 includes standard features to create and run Windows applications with full bidirectional language functionality.  However, these features are operational only when Microsoft Visual Basic 5.0 is installed in a bidirectional 32-bit Microsoft Windows environment, such as Arabic Microsoft Windows 95. Other bidirectional 32-bit Microsoft Windows environments are available as well.

The RightToLeft property has been added to forms, controls, and other Visual Basic objects to provide an easy mechanism for creating objects with bidirectional characteristics. Although RightToLeft is a part of every Microsoft Visual Basic 5.0 installation, it is operational only when Microsoft Visual Basic 5.0 is installed in a bidirectional 32-bit Microsoft Windows environment.

Bidirectional Features online help describes all Microsoft Visual Basic 5.0 bidirectional features. When Microsoft Visual Basic 5.0 is installed in a bidirectional 32-bit Microsoft Windows environment, choose the Bidirectional Features item on the Help menu to access Bidirectional Features online help. Otherwise, locate and double-click the file Bhelp32.hlp.

For compatibility with Microsoft Visual Basic 4.0, two versions of the 32-bit Grid control (Grid32.ocx) are included with Microsoft Visual Basic 5.0 but not installed. Both are located in the \Tools folder of the product media. The standard and bidirectional versions are located in the \Controls and \Controls\Bidi subfolders, respectively.


Unload Me Statement in ListBox Control ItemCheck Event Causes GPF (ReadMe)

Attempting to unload a form using Unload Me in the ListBox control's ItemCheck event causes a GPF. For example:

Private Sub Form_Load()

    Dim i%

    For i = 0 To 20

        List1.AddItem i

    Next i

End Sub

Private Sub List1_ItemCheck(Item As Integer)

    Unload Me

End Sub

This sample also produces a GPF if the spacebar is pressed, or if you attempt to select an item in the list box using a command button.

The recommended procedure for unloading a form is to add the Unload statement to the Click event in a CommandButton or Menu control.


CommonDialog Control Constant cdlHelpContents May Be Obsolete (ReadMe)

Help files created in newer versions of the Windows Help Compiler may not support accessing Contents topics with the CommonDialog control constant cdlHelpContents. For example, attempting to access a help file Contents topic as in the example below may not produce the desired results:

Private Sub cmdHelpContents_Click()

    dlgCommon.HelpFile = "help\vb5.hlp"

    dlgCommon.HelpCommand = cdlHelpContents

    dlgCommon.ShowHelp

End Sub

Help files created with newer versions of the Windows Help Compiler use .cnt files to display the Contents topic in the Help viewer application. This is a change from previous versions. Therefore, the CommonDialog control constant cdlHelpContents no longer works.

The following information from the Platform SDK (formerly Win32 SDK) summarizes this change:

“In the past, applications have used HELP_CONTENTS and HELP_INDEX commands with the WinHelp function to display the Contents topic and the keyword index of the help file. These commands are no longer recommended. Use the HELP_FINDER command instead.”

Visual Basic 5.0 does not provide a CommonDialog control constant equivalent to the WinHelp function HELP_FINDER command. To access the Contents topic in a help file, declare the WinHelp command as a constant, as in this example:

Const HelpFinder = &h000B

For more information on using WinHelp commands, refer to the Platforms SDK.


"Permission denied" or "Unexpected error" when compiling OCX or DLL (ReadMe)

When compiling an ActiveX control or ActiveX DLL project with the Binary Compatibility option selected, you may encounter thse errors if you:

•	Compile the project to the same .ocx (or .dll) file you specified for Binary Compatibility, AND

•	Compile the .ocx (or .dll) file more than once in the same Visual Basic session.

Note   If the error log contains "LINK : fatal error LNK1104: cannot open file "<path>\<filename>" after you receive "Unexpected error occurred in code generator or linker," you must close Visual Basic and delete the file named in the message.

Explanation

In general, you should not compile a component to the same file you specified for Binary Compatibility. Doing so will bulk up the file with extraneous interface information for these interim builds, as discussed in "Version Compatibility.”

Instead, use the following rule of thumb to determine which Version Compatibility option to use:

•	If you're creating a brand new control (or code component), select Project Compatibility and specify the file you normally build to.

Note   Project Compatibility is the default for new projects.

•	If you're creating a new version of a control (or code component) you have released to other developers, and you want your new version to be compatible with applications compiled using the earlier version, select Binary Compatibility and specify a reference copy of your released .ocx (or .dll) file.

Important   This should be a copy of the file you distributed to developers; DO NOT specify the file you normally build the project to.

•	If you're creating a new version of a control you have released to other developers, and you need to make changes that will prevent the control from working with previously compiled applications, select Project Compatibility and specify your normal build file.

Project Compatibility guarantees that copies of your control in existing projects can easily be upgraded when you distribute the new version to developers (hence the name). It does not guarantee that a new version of your control will be compatible with applications compiled using earlier versions.

Important   Be sure to change the filename of your .ocx when you author a version that does not work with previously compiled applications. Standard practice is to include a version number in the filename. If you're creating a new version of a code component, you should also change the Project Name.

Version Compatibility options can be selected from the Component tab of the Project Properties dialog box.

Note   "Permission denied" can also occur if the compiled .ocx file is in use by a client program. You must close all client programs — for example, Microsoft Internet Explorer or the Microsoft ActiveX Control Pad — in order to release the .ocx file so that you can recompile it.


UserControl object doesn't support DDE (ReadMe)

Controls authored with Visual Basic do not support Dynamic Data Exchange (DDE) to or from the UserControl object or any of its constituent controls.

Note   The constituent controls on your UserControl will display DDE-related properties, methods, and events. However, if you attempt to set the LinkMode property, run-time error 369, "Operation not valid in an ActiveX DLL," will occur.

More Information

The properties, methods, and events that allow a control to support DDE (such as the LinkMode property, or the LinkOpen event) are not part of the control. They are added by the container's Extender object, but only if the control's type library includes the necessary interfaces. These interfaces are not included in the type library created when an ActiveX control project is compiled, so the controls in the resulting .ocx file cannot support DDE.

Giving your control properties, methods, and events with the standard names will not enable DDE support for your control, because these properties and methods must be supplied by the container. In fact, if you supply events with the standard names (such as LinkOpen), Visual Basic will not allow you to put an instance of your control on a form.


Changing UserControl property doesn't affect compiled applications (ReadMe)

If you release a control authored with Visual Basic, and later decide to release an enhanced version of this control, some compatibility issues will not be handled by the Version Compatibility feature.

For example, consider the following scenario:

•	You release SuperDuperComm.ocx version 1.0, and distribute it to developers. The control is visible at run time.

•	Developers distribute applications compiled with SuperDuperComm.

•	When you release version 2.0 of SuperDuperComm, you set the InvisibleAtRuntime property of the UserControl object to True, in response to developer feedback. You use Binary Compatibility (set using the Component tab of the Project Properties dialog box) to ensure that the new version will work with applications compiled with version 1.0.

•	The new SuperDuperComm is installed on machines that have applications compiled with version 1.0, but developers report that the control is still visible at run time.

The reason for this is that invisibility at run time is a service provided by the container (for example, a Visual Basic form), and since version 1.0 of the control didn't ask for it, the compiled container doesn't supply it.

Other properties of the UserControl object that depend on services supplied by the container include:

•	ControlContainer

•	CanGetFocus

•	Alignable

•	ForwardFocus

•	DefaultCancel

•	ToolboxBitmap

•	Public

Changing these properties from one version of your control to the next will not affect the control's behavior in compiled applications.

Related issues are discussed in "Versioning Issues for Controls."


Event arguments that use OLE data types are not recognized in Access (ReadMe)

Microsoft Access does not recognize the standard OLE data types listed in the following table, and will translate them as shown:

OLE data type	Appears in Access as
OLE_TRISTATE	Long
OLE_HANDLE	Long
OLE_OPTEXCLUSIVE	Boolean
OLE_COLOR	0
For example, suppose you declare the following event in a control authored using Visual Basic:

Event TestType(ByVal OT As OLE_TRISTATE, _

ByVal OO As OPT_EXCLUSIVE, ByVal OC As OLE_COLOR)

If the compiled control is used in Microsoft Access, the event procedure will appear as follows:

Private Sub MyControl1_TestType(ByVal OT As Long, _

ByVal OO As Boolean, ByVal OC As 0)

End Sub

For all types except OLE_COLOR, the data types used by Microsoft Access are the same size as the standard data types. However, the code for OLE_COLOR will not compile. Thus, if you expect your control to be used in Microsoft Access, do not use OLE_COLOR as a data type for event arguments.


UserControl containing User Forms Textbox may not work on a UserForm (ReadMe)

The Microsoft User Forms used in Microsoft Office applications include a set of controls similar to the intrinsic controls in Visual Basic. These controls can be used on Visual Basic forms, or placed on UserControl or UserDocument designers.

Note   If you use these controls in your application or .ocx, SetupWizard must include the support DLL for Microsoft User Forms in your Setup program.

The following scenario is known to cause problems:

•	Author a control in Visual Basic by placing a User Forms Textbox on a UserControl designer, and then make an .ocx file.

•	Place an instance of your new control on a User Form.

•	When the form is run, it may not be possible to type in the User Forms Textbox.

Use of the User Forms Textbox control on a UserControl object is not recommended.


An object may terminate with a Friend method in the Call Tree (ReadMe)

When you call a property or method of an object, that procedure remains in the Call Tree (that is, on the stack) until it returns. If all references to an object are released while one of its public properties or methods is in the Call Tree, Visual Basic will not allow the object to terminate. The object's Terminate event will only occur after it has no more public properties or methods in the Call Tree.

Visual Basic provides this protection for public members because if an object is allowed to terminate while code is in the Call Tree, the memory used by the object will be freed, and a program fault will occur when the member finally returns.

Properties and methods declared with the Friend keyword do not have this protection. In most cases it is not necessary, because in ordinary programming scenarios with Friend members it is very difficult to cause an object to terminate while it has code on the stack.

One scenario in which this may occur is when a Friend method is used to raise a public event, AND the Friend method is called by an event outside Visual Basic, such as a system timer set up using the AddressOf operator. In this case, the method must be changed from Friend to Public to avoid potential program faults.

The XTimer class used in the Coffee sample application provides an example of this.


Manually editing VB_PredeclaredId attribute causes problems (ReadMe)

If you edit Visual Basic source files using a text or code editor other than Visual Basic, be careful not to change settings of the attribute VB_PredeclaredId. In particular, changing this attribute may cause serious problems with GlobalMultiUse and GlobalSingleUse classes.

In general, you should not edit attributes manually, as doing so may put the module into an internally inconsistent state.


AmbientProperties.Font clones container's ambient font (ReadMe)

When you access the Font property of the AmbientProperties object, you do not get a reference to the container's font. Rather, you get a copy (clone) of the font.

The reason for this is that AmbientProperties.Font is commonly used to initialize a control's font whenever an instance of the control is added to a container. If a reference to the font itself were supplied, then changing the control's font would change the container's font as well.

If for some reason your control requires a reference to the container's font, you can obtain it by accessing the container through the Parent property of the UserControl object.


To use GlobalMultiUse objects internally, declare a global variable (ReadMe)

Setting the Instancing property of a class to GlobalMultiUse or GlobalSingleUse in an ActiveX Exe or ActiveX DLL project adds the properties and methods of that class to the global name space of any client project. That is, the properties and methods can be used as if they were global functions, without explicitly creating an instance of the class.

The creation and use of such global objects is discussed in "Global Objects and Code Libraries." This topic also discusses the limitations of global objects, in particular the following limitation:

"The properties and methods of a global object only become part of the global name space when the component is referenced from other projects. Within the project where you created the GlobalMultiUse class module, objects created from the class are just ordinary objects."

That is, if you create project MyUtilities that contains a Utilities class with Instancing = GlobalMultiUse, and give the class an InvertMatrix method, then from any client project (one in which you've set a reference to MyUtilities) you can call InvertMatix without any qualification. However, within the MyUtilities project you must create an object of type Utilities and use that object to call InvertMatrix.

The recommended workaround (which is only hinted at in the topic noted above) is to declare a global variable in a standard module, as follows:

Public Utilities As New Utilities

Thereafter, whenever you need to use InvertMatrix (or any other procedure supplied by the Utilities class), you can qualify it with the class name:

Utilities.InvertMatrix aintMyLargeMatrix

The first time you use a method of the Utilities class in this fashion, an instance of the class is created automatically, because the global variable is declared As New. Using the class name as the name of the variable makes it clear which of the modules within your component is supplying the procedure.

Note   You must declare this global variable in a standard module, not a class module, in order for this technique to work.


Component that uses App.PrevInstance can cause problems (ReadMe)

A computer running Windows NT can support multiple desktops. When you're using a component designed to work with distributed COM, this can result in the following scenario:

•	A client program in a user desktop requests one of the objects the component provides. Because the component is physically located on the same machine, the component is started in the user desktop.

•	Subsequently, a client program on another computer uses distributed COM to request one of the objects the component provides. A second instance of the component is started, in a system desktop.

There are now two instances of the component running on the same NT computer, in different desktops.

This scenario is not a problem, unless the author of the component has placed a test for App.PrevInstance in the startup code for the component, to prevent multiple copies of the component from running on the same computer. In this case, the remote object creation will fail.


Don't change font on multiple controls with floating Properties window (ReadMe)

When using Visual Basic in Multiple Document Interface (MDI) mode, it is possible to display the Properties window either docked to the main window (the default) or floating.

If the Properties window is floating, AND two or more controls are selected, AND you change the Font property of the controls using the floating Properties window, a program fault will occur in Visual Basic.


Don't change default member to Friend or Private (ReadMe)

If you have used the Procedure Attributes dialog box to make a public property or method of a class the default member for that class, do not edit the declaration for the member and change Public to Friend or Private, without first removing the Default attribute. Doing so will cause serious problems in your program.

If you find yourself in this situation, make the member Public again, and use the Procedure Attributes dialog to remove the Default attribute. You can then change the declaration back to Friend or Private.


Help for DateSerial gives incorrect information on Year argument (ReadMe)

Help for the DateSerial function incorrectly describes the way the year argument is interpreted. The text should read as follows:

For the year argument, values between 0 and 29, inclusive, are interpreted as the years 2000–2029. Values between 30 and 99, inclusive, are interpreted as the years 1930–1999. For all other year arguments, use a four-digit year (for example, 1800).


If you're using Visual Basic 5.0 with Windows NT 4.0... (ReadMe)

Microsoft regularly provides updates to Windows NT, to supply customers with the latest corrections to problems that have been reported. These Service Packs are referred to by the letters "SP" followed by a number (for example, "SP1").

When you install Visual Basic 5.0 on a system running Windows NT 4.0, Visual Basic automatically installs the OLE Automation support DLLs included in SP2. The entire SP2 update is included on the distribution CD, and It is highly recommended that you apply it to your system.

Note   If the application you're creating is to run on Windows NT 4.0, users should upgrade their systems to SP2 before installing your application. This is particularly important if your application uses distributed COM.

The following problems are known to occur with SP2, and are fixed in SP3. If you have applied SP2 to your system, and you encounter any of these problems, you should obtain and apply SP3.

•	OLE initialization can fail if an object is created on a second thread while the first thread is still initializing OLE. This is most likely to occur when running multithreaded Exe components in stressful conditions (such as multiprocessor machines).

•	Calling a method of an object in a component running on another machine, using distributed COM, fails if the method has more than 16 arguments, and at least one but not more than 15 of those arguments are ByRef.

•	OLEAUT32.DLL fails to self-register if StdFont and StdPicture are not correctly registered (RISC only).

•	Alignment fault when loading a metafile into a Picture object (RISC only).

•	Problems displaying GIF and JPEG files in 16-color mode.

•	Font facenames longer than 16 characters can overwrite data on the stack (RISC only).

•	When a double-byte Font is copied after one or more properties have been changed, the cloned Font may be in an inconsistent state. (A workaround is to read one property before copying the Font.)

•	Palette behavior is inconsistent with Visual Basic 4.0.

•	A program fault can occur when using controls that display property pages (RISC only).

•	Problems displaying double-byte fonts (for example, Japanese).

•	When using distributed COM between a Windows NT system and a UNIX system, Variants will not be passed correctly.

Note   SP3 is not available on the VB5 CD. Information on its availability can be obtained from the Microsoft Visual Basic Web Site. As with SP2, users should upgrade their systems to SP3 before installing your application.

Some of the items in the list above also affect Visual Basic applications running on Windows 95. SP3 cannot be used to upgrade Windows 95. Microsoft is currently investigating distribution mechanisms for operating systems other than Windows NT; information will be available on the Microsoft Visual Basic Web Site.


MaskPicture property requires black and white bitmap in Windows 95 (ReadMe)

When a multicolor bitmap is assigned to the MaskPicture property of a UserControl, and a color other than white is assigned to the MaskColor property, the control will behave as if the MaskColor property had been set to white.

This problem occurs when the control is used on systems running Windows 95. To correct the problem, use a bitmap with two colors — white for all areas where the control is to be transparent, and black for all areas where the control is to be opaque.

Note   Set the MaskColor to white, so that transparency will also work correctly on systems running Windows NT.

A color bitmap can be converted to a black-and-white bitmap by changing the pixels as follows: If a pixel is the desired mask color, set it to white; if the pixel is any other color, set it to black.


Exe component hangs creating object from second Exe during startup (ReadMe)

If the startup code for an out-of-process component (ActiveX Exe) attempts to create an object from a second out-of-process component, before returning control to the client Exe, the component will hang.

This occurs only on systems running Windows 95.

The component will hang only if all three programs — the client and both components — are single-threaded .exe files. You can avoid the problem by deferring creation of the object supplied by the second component until a later time.

The problem can be also be fixed by upgrading the Windows 95 machine with the Distributed COM support package for Windows 95.


Help for DateSerial gives incorrect information on Year argument (ReadMe)

Help for the DateSerial function incorrectly describes the way the year argument is interpreted. The text should read as follows:

For the year argument, values between 0 and 29, inclusive, are interpreted as the years 2000–2029. Values between 30 and 99, inclusive, are interpreted as the years 1930–1999. For all other year arguments, use a four-digit year (for example, 1800).


StandardSize Property for Property Pages Doesn't Work As Expected (Readme)

The StandardSize property for property pages may not give the expected result when set to 1 - Small or 2 - Large. This property only affects the size of the property page for the author’s display driver and resolution. Unexpected results my occur on other displays.

It is suggested that you use the default StandardSize property value (1 - Custom) and treat a property page as you would any other form.


PaintPicture Method: Opcode Argument Only Applies to Bitmaps (Readme)

Opcode, the last optional argument to the PaintPicture method, is used to pass a bitwise operation on a bitmap. Placing a value in this argument when passing other image types will cause a “Invalid procedure call or argument” error. This is by design. To avoid this error, leave the Opcode argument blank for any image other than a bitmap.


Help Button Doesn't Show Up On Property Page (Readme)

When working with a UserControl in the design environment, the Help button on the property page may not show up the first time the property page is shown. To remedy the situation, open and then close the designer for the UserControl. The next time the property page is accessed the Help button will appear.

This is a known problem only in the design environment; Property pages for a compiled UserControl do not exhibit this behavior.


Referencing a Private User Control Prior to Form Load Causes Type Mismatch Error (Readme)
Referencing a Private UserControl Before Form Load May Cause Error (Readme)

A “Type Mismatch” error may occur if you try to reference a UserControl before loading the containing form. For example, the Set statement in the following code causes an error:

Sub Main()

    Dim a As UserControl1

    Set a = Form1.UserControl11

End Sub

To prevent this error, load the form before referencing the UserControl:

Sub Main()

    Dim a As UserControl1

    Form1.Show

    Set a = Form1.UserControl11

End Sub

This behavior only occurs with UserControls added to a project via the Add UserControl command on the Project menu, and with the Public property set to False. Public UserControls added via the References dialog do not cause the error.


Changing Case of Form or Module Names Causes Load Error (Readme)
Changing Case of Form or Module Names May Cause Load Error (Readme)

Changing the case of the Name property value for a Form or other module without otherwise changing the name itself can cause a “Conflicting names” error message the next time the project containing the is loaded. For example, changing “Form1” to “form1” will cause the error; changing “Form1” to “formX” will not.

The error is caused by the way module names are stored within the project file – the procedure for changing names within the project file isn’t case sensitive, while the procedure for reading names on project load is.


Control Creation Edition Install Some Files as Read-only (Readme)
Control Creation Edition Installs Some Files as Read-only (Readme)

Some of the documentation files included with the Control Creation Edition of Visual Basic are installed with read-only attributes. This can cause a “Read-only” warning to be displayed when attempting to uninstall Visual Basic.

To avoid the warnings, change the attributes of any read-only files in the Visual Basic directory before uninstalling.


Hard-typed objects permitted as Optional parameters in Visual Basic 5
Hard-typed Objects Permitted as Optional Parameters (ReadMe)

The description of permitted types in optional arguments is incorrect. An argument specified as Optional can have a specific object type. For example, the argument specification Optional MyArg As Worksheet is valid as long as the object type is within scope of the declaration. The only type prohibited is a user-defined type.


Method incorrectly called property
Method Incorrectly Called Property (ReadMe)

DesignerWindow is referred to as a property in its Help topic title. It is actually a method. The substantive information in the topic is correct.


Properties incorrectly called methods
Properties Incorrectly Called Methods (ReadMe)

The following Add-in elements are referred to as methods in their Help topic titles. They are actually properties: ProcBodyLine, ProcCountLines, ProcOfLine, ProcStartLine. The substantive information in these topics is correct.


Issues with Entry of Non-Latin Characters

Many WIN32 API functions are coded to use the system LCID setting. If the user and system LCID settings don't match you may see issues in VB such as dialogs and controls displaying illegible text on entry of characters from non-Latin alphabets.

It is possible to fix the problem in NT by checking the "set as system default locale" check box in the Regional Settings, then rebooting the system. Windows 95, on the other hand, sets the system LCID at install time. It is advisable to install the localized version of Windows 95 with the same language as the user LCID. If using the Paneuropean version of Windows 95, it is necessary to perform a custom installation and select the correct locale during the setup.

Once system and user are synchronized however, while VB controls may behave properly, entry of non-Latin characters will still result in illegible text displaying in VB's design environment (IDE) dialogs. Functionality is maintained, however.


Rich Error Handling Suggested in Initialization Code for ActiveX Documents

When untrapped errors occur in the initialize event of an ActiveX document, Internet Explorer may display an error message indicating it's unable to load the .vbd file. it is strongly suggested that you put rich error handling in place in any initialization code for UserDocument objects.


App.Path Property and Curdir Function May Return UNC Paths, Depending on How the /Project is Run
App.Path Property and CurDir Function May Return UNC Paths, Depending on How the Program/Project is Run

In VB5, App.Path returns a UNC path (\\Server\Share...) rather than a drive path (e:\Folder\Folder...) in the following circumstances:

•	When a project is run after being loaded from a network share, even if the network share is mapped to a drive letter.

•	When a compiled exe is run from a network share, but only if the exe is run using a UNC path.

This is a change from Visual Basic 4.0, and may cause problems for some existing code. The problems for compiled programs are different from the problems that occur when running a project in the development environment.

Compiled Exe:  Some projects use the following two lines of code in sub main to change the current directory (as returned by the CurDir function) to match the startup directory (as returned by App.Path):

Chdrive App.Path

Chdir App.Path

ChDrive cannot handle UNC paths, and will raise an error when App.Path returns a UNC path.  You can handle this error by placing On Error Resume Next before the ChDrive statement, or by testing the first two characters of App.Path to see if they are backslashes.

On Error Resume Next

ChDrive App.Path

ChDir App.Path

This modification handles all cases in which the program is started from Windows using a UNC path (for example, in the Run dialog accessed from the Start menu), because Windows sets the current directory to a UNC path. ChDir handles changes between UNC paths correctly.  (The failure of ChDrive can be ignored, because there is no drive letter for a UNC path.)

However, the code above will not work if a user runs the program by typing a UNC path at the command line of a DOS window.  This is because a DOS window always has a drive path for the current directory, so CurDir is set to a drive path. ChDir does not raise an error, but it fails to change the directory from a drive path to a UNC path.  The only workaround for this is to locate a local drive that's mapped to the share specified in the UNC path, or to use network commands to create such a mapping.

In the development environment:  If the project was loaded from a network share, either a UNC path or a mapped drive path, then App.Path will return a UNC path when the project is run.  ChDrive will fail and raise an error. ChDir will not raise an error, but the directory will not be changed.  The only workaround is to set the drive and directory manually, as in the following example:

Const Projectshare = "e:\Vbproj\Myproject"

#Const Debug = True

#if Debug Then

    ChDrive Projectshare

    ChDir Projectshare

#Else

    On Error Resume Next

 ChDrive App.Path

 ChDir App.Path

#End If

If more than one developer might open the project on the network share, a DOS environment variable can be used to allow each developer to have her own mapping for the share:

#Const Debug = True

#If Debug Then

    Chdrive Environ$("Myprojectdir")

    Chdir Environ$("Myprojectdir")

#Else

    On Error Resume Next

    ChDrive App.Path

    ChDir App.Path

#End If

The value of Myprojectdir specifies the mapped drive letter and the path, for example:  Set Myprojectdir=m:\Vbproj\Myproject

Note that the Help topics for the Path property, ChDir statement, ChDrive statement, and CurDir function do not mention this changed behavior.


Fix to Excel Sample Code in Programming with Components

In "Programming with Components," the section “Working with ActiveX Components” contains sample code adding values to Excel. You should add the line

Xlbook.Close

immediately above the statement Xlapp.Quit. This ensures that all sheet objects are released.


Print Method is Not Listed in the Object Browser or With Objects It Applies To

The Print method applies to the Form, Printer, PictureBox, UserControl, UserDocument, PropertyPage, and Debug objects.

In Help, the Print method should appear in the methods lists of all of these objects, although in fact it only appears for the Debug object. In addition, these objects should all appear in the Applies To list in the Print method topic, although in fact only the Debug object appears there.

For technical reasons, the Print method does not appear in the Object Browser, even though it is a valid method of the objects listed above.


Component Download Fails For DCOM Projects

The .cab installation will work if the RemoteReg .cab is located in the same folder as Msracli.cab. If Msracli.cab is located in another location, component download will fail. The workaround is to modify the .inf file so that Msracli.cab is located in the local folder. This means you need access to Msracli.cab and must know how to build a .cab without Setup Wizard.


ActiveX Document Internet Download Issues

The sample HTML page created by the Setup Wizard for ActiveX document-based projects will download and register the VB5-created exe or DLL and then jump to the .vbd file.  The jump from the HTML page to the .vbd file will prevent any merged menus from displaying. Additionally, the DataChanged method will not operate correctly. The workaround is to replace the Setup Wizard-generated HTML Window_Onload event code with the following (where userdocument1.vbd refers to your vbd filename.)

Sub Window_Onload

Window.Navigate "userdocument1.vbd"

End sub

Note: You can bypass the HTML page altogether and navigate directly to the .vbd file after the VB5-created .exe or .DLL has been successfully downloaded to the client. For the latest information on the Setup Wizard and ActiveX document Internet download go to http://www.microsoft.com/vbasic/icompdown/.


Download Problems with Multiple VB5-Authored Controls on a Single HTML Page

If a single HTML page will contain multiple VB-authored ActiveX controls, put all of the controls into a single VB project, and run the Setup Wizard on that project. The Setup Wizard will create a single cab file for all the controls. The containment of all controls within a single cab file minimizes download time and removes the possibility of files being downloaded more than once.


ActiveX Designers May Not Be Used in Unattended Servers

VB5 does not support the use of ActiveX designers in multi-threaded (unattended) components. The UI prevents this in most cases but there is a small loophole present that allows you to build a VB component containing ActiveX designers and mark the server as “unattended-execution,” which in turn registers that component as “apartment-threaded.” Doing this is unsupported and does not produce favorable results. For example, marking a project that contains a UserConnection designer as “unattended execution” and using it in a multi-threaded environment such as the Microsoft Transaction Server results in Out of Memory errors or more severe problems.

The workaround is to always compile projects containing ActiveX designers as single-threaded. In other words, in these cases do not check Unattended Execution.


GPFs on Startup of VB5

If you get a GPF during startup of VB5 it is probably caused by an incompatible add-in. You should edit the vbaddin.ini and set all entries to zero.  Once the entries are set to zero VB5 will not load any add-ins on start-up.  You can then use the add-in manager to add back add-ins that are working properly.

If you get a GPF on start-up of the Visual Basic Learning edition it may be caused by add-ins installed by the Visual Basic Control Creation edition beta.  The work-around is the same as above. Also, you should install the released version of the Control Creation edition.


Visual Basic 4.0 Event Procedures May Cause Errors in Visual Basic 5.0

Visual Basic 4.0 did not recognize some typelib-defined data types, such as OLE_HANDLE. When these types were used in event arguments, Visual Basic 4.0 would replace them with the corresponding native type (in this case, Long). Thus, Visual Basic 4.0 would produce the following event procedure for an event with an argument of type OLE_HANDLE:

Private Sub Somecontrol1_Someevent(Byval oh As Long)

End Sub

If this same event procedure prototype is created in Visual Basic 5.0, the correct data type will be used:

Private Sub Somecontrol1_Someevent(Byval oh As _

stdole.OLE_HANDLE)

End Sub

If code generated in Visual Basic 4.0 is imported into Visual Basic 5.0, the event types will not match, and the code will not compile. The solution is to cut the code from the existing event procedure, delete the event procedure prototype and recreate it in Visual Basic 5.0, and then paste the code back into the event procedure.


Visual Basic, Control Creation Error Messages

No Help exists for the following error messages specific to the Control Creation edition.

No Data Control Support in Control Creation Edition of Visual Basic

Support for data binding is not included in the Control Creation Edition. To create controls that support data binding, you must use the Professional or Enterprise Edition of Visual Basic.

No /MakeDll command line option in Control Creation Edition of Visual Basic

Control Creation Edition does not support the creation of exe or DLL files, either from the development environment or from the command line. To compile Standard Exe projects, you can use the Standard, Professional, or Enterprise Editions of Visual Basic. To compile ActiveX Exe or DLL projects, you can use the Professional or Enterprise Edition of Visual Basic.

No Exe Compilation in Control Creation Edition of Visual Basic

Control Creation Edition does not support the creation of exe or DLL files, either from the development environment or from the command line. To compile Standard Exe projects, you can use the Standard, Professional, or Enterprise Editions of Visual Basic. To compile ActiveX Exe or DLL projects, you can use the Professional or Enterprise Edition of Visual Basic.

Invalid Project Type Compilation for Control Creation Edition of Visual Basic

Control Creation Edition enables the creation of .ocx files containing ActiveX controls.  It does not support the creation of exe or DLL files, either from the development environment or from the command line.

This means that you cannot compile the following project types: ActiveX Exe, Standard Exe, and ActiveX DLL. To compile Standard Exe projects, you can use the Standard, Professional, or Enterprise Editions of Visual Basic. To compile ActiveX Exe or DLL projects, you can use the Professional or Enterprise Edition of Visual Basic.

No ActiveX Designer Support in Control Creation Edition of Visual Basic

Control Creation Edition does not support the use of ActiveX Designers. ActiveX Designers can be used with the Standard, Professional, or Enterprise Editions of Visual Basic.


Error Running Setup for CCE Help Before Installing CCE

Setup for CCE Help attempts to register Comctl32.ocx, in order to synch up the registry entries for the controls and Help files. If Help is installed on a system where Comctl32.ocx has never been installed, an error will occur. This error is harmless.

If CCE is installed before installing the Help files, no error occurs.