Microsoft KB Archive/182352

= PRB: Windows Common Control Keys are Case-Sensitive =

Article ID: 182352

Article Last Modified on 1/8/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q182352



SYMPTOMS
The Microsoft Windows common control keys are case-sensitive and returns an error if the correct case is not used. The following error will be returned when the incorrect case is used:

Element not found



CAUSE
The cause of the problem is that the case of the Key is not correct.



RESOLUTION
Enter the proper case for the Key and it will work as expected.



STATUS
This behavior is by design.



MORE INFORMATION
The following steps demonstrate how the keys are case-sensitive in the Microsoft Common Controls.

Steps to Reproduce Behavior
 Create a new Visual Basic Project. Form1 is created by default. From Project Components menu, select Microsoft Common Controls. Add the ImageList Control to the form. Right-click the Imagelist Control, and then select Properties. On the Images tab, choose Insert a BMP file, type "First" for key value, and then choose Apply. Add a Toolbar control. Right-click on Toolbar, and then select Properties. Select "ImageList1" from the Imagelist dropdown box, and then choose Apply. Click on the Buttons tab, click Insert Button, and then type "Button" next to Key: and type "first" next to Image: Click on Apply Note: "Element not found" error returned.</li> Type in "First" for image key button, and no error is received. Click on Apply and BMP appears.</li>  Double-click the toolbar and enter the following code in the ButtonClick event: SELECT CASE Button.Key Case "button" MSGBOX "case insensitive" Case "Button" MSGBOX "case sensitive" END SELECT </li> Press the F5 key to run the application and click the toolbar and note that the "Element not found" error message is returned.</li></ol>

Additional query words: capital upper lower kbVBp500 kbVBp600 kbdse kbCtrl kbDSupport kbVBp

Keywords: kbprb KB182352

-

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

© Microsoft Corporation. All rights reserved.