Microsoft KB Archive/936166

= The text of an option button in a frame is obscured by black rectangles when a DLL is called from Visio 2007 on a Windows XP-based computer =

Article ID: 936166

Article Last Modified on 7/18/2007

-

APPLIES TO


 * Microsoft Office Visio Professional 2007
 * Microsoft Office Visio Standard 2007

-



SYMPTOMS
Consider the following scenario. You have a Visual Basic form that was compiled in Microsoft Visual Basic 6.0. The form is used to capture user responses programmatically. Frames in this form contain option buttons. Additionally, you compile the form into a DLL. In this scenario, when the DLL is called from Microsoft Office Visio 2007 on a Microsoft Windows XP-based computer, the text of the option button in the frame is obscured by black rectangles. All other text in the form is displayed correctly.

Note If the same DLL is called from other Microsoft Office applications, for example Microsoft Office Visio 2003, the text of the option button in the frame is displayed correctly. Additionally, all the text in the form is readable. If the same DLL is called from Visio 2007 on a Windows Vista-based computer, the text is displayed correctly.



CAUSE
This issue occurs if the display theme is set to Windows XP on a Windows XP-based computer. Specifically, this issue is caused by the Windows and buttons setting on the Appearance tab in the Display Properties dialog box.

In the Windows XP theme, the regular setting for Windows and buttons is Windows XP style. Because of a bug in Visio 2007, the objects in the frames of a Visual Basic form are obscured by black rectangles when the Windows XP style is used.



WORKAROUND
To work around this issue, use one of the following methods:  Right-click the desktop, click Properties, click the Themes tab, and then select Windows Classic in the Theme list. Alternatively, click the Appearance tab in the Display Properties dialog box, and then click Windows Classic style in the Windows and buttons list. Do not put option buttons inside frames. Use the SetWindowTheme API to remove Visual style for controls.

For more information about the SetWindowTheme function, visit the following Microsoft Web site:

http://msdn2.microsoft.com/en-us/library/ms649966.aspx



Additional query words: VISIO2007 VSO2007 blacked out

Keywords: kbtshoot kbprb kbexpertiseinter KB936166

-

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

© Microsoft Corporation. All rights reserved.