Microsoft KB Archive/78399

= PRB: Syntax Error If VB CDK Custom Property Name Starts w/ Num =

Article ID: 78399

Article Last Modified on 11/18/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 1.0 Standard Edition

-



This article was previously published under Q78399



SYMPTOMS
When a control property starts with a numeric value, Visual Basic generates this syntax error:

Expected: end-of-statement.

However, the property works correctly in the Visual Basic design mode from the Properties bar (or window in version 2.0).



CAUSE
The Property Name (npszName) field in the PROPINFO structure for the Visual Basic Control Development Kit (CDK) cannot start with a numeric value.



RESOLUTION
This information needs to be added to page 143 of the &quot;Microsoft Visual Basic: Control Development Guide&quot; shipped with Microsoft Professional Toolkit for Visual Basic 1.0 for Windows, or page 132 of the &quot;Microsoft Visual Basic: Control Development Guide&quot; shipped with the earlier CDK add-on for Microsoft Visual Basic.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
  Rebuild the Circle3 example provided with the CDK after changing the PROPINFO Property_FlashColor structure in CIRCLE3.H to the following: PROPINFO Property_FlashColor = {  &quot;2FlashColor&quot;, DT_COLOR | PF_fGetData | PF_fSetData | PF_fSaveData | PF_fEditable, OFFSETIN(CIRCLE,  FlashColor) } ;                         While in Visual Basic development environment (VB.EXE) with the Circle3 control loaded, assign the 2FlashColor property a value: Circle1.2FlashColor = 2  Press F5 to generate the &quot;Expected: end-of-statement&quot; error message. The text &quot;FlashColor&quot; will be selected for the syntax error.

Additional query words: docerr noupd 2.00

Keywords: kbprb KB78399

-

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

© Microsoft Corporation. All rights reserved.