Microsoft KB Archive/190068

= BUG: Control Interface Wizard May Not Expose BackColor Property =

Article ID: 190068

Article Last Modified on 5/13/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q190068



SYMPTOMS
After you have used the ActiveX Control Interface Wizard to expose both the Appearance and BackColor properties of a control and you use the control in a project, any changes that you make to the BackColor property in the control's Properties window do not appear when you run the project.



RESOLUTION
You can manipulate the desired properties in code, or you can choose not to expose the Appearance property.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Behavior
Create a UserControl Using the ActiveX Control Interface Wizard:


 * 1) Start Visual Basic 6.0, and open a new ActiveX Control project. Place a command button on the UserControl.
 * 2) From the Add-Ins menu, select Add-In Manager and double-click "VB 6 ActiveX Ctl Interface Wizard" in the Available Add-Ins column. Click OK to dismiss the dialog.
 * 3) From the Add-Ins menu, select ActiveX Control Interface Wizard.

NOTE: If the Introduction screen for the ActiveX Control Interface Wizard appears, click Next.
 * 1) In the Select Interface Member screen, choose the Appearance property from the Available Names list on the left, click the ">" button to add it to the Selected Names list on the right. Click Next.
 * 2) When the Create Custom Interface Members screen appears, click Next.
 * 3) In the Set Mapping window, under the Public Name list, select the Appearance and BackColor properties for the UserControl member in the Control and Member lists. Click Next.
 * 4) In the Set Attributes window, click Finish. Click Close to quit the ActiveX Control Interface Wizard Summary dialog box.
 * 5) From the File menu, select Make Project1.ocx to compile the control.

Test the UserControl in Another Project:


 * 1) Create a new Standard EXE project.
 * 2) Select Components from the Project menu. Add the UserControl to the toolbox by selecting it from the list and clicking Apply.
 * 3) Place the UserControl from the toolbox onto Form1 in your Standard EXE project.
 * 4) In the Properties window, change the BackColor Property of the ActiveX Control to Red.
 * 5) Press the F5 key to run the project.

RESULT: The UserControl appears with the design-time BackColor (based on the Appearance Property setting) instead of the BackColor (Red) that you chose in the Properties Window for that control.

Keywords: kbbug kbwizard kbpending KB190068

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.