DOCUMENT:Q191719 24-AUG-1998 [vbwin] TITLE :BUG: UpDown Control's BuddyProperty Returns Empty String in EXE PRODUCT :Microsoft Visual Basic for Windows PROD/VER: OPER/SYS:WINDOWS KEYWORDS: ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, versions 5.0, 6.0 --------------------------------------------------------------------- SYMPTOMS ======== When an UpDown control's BuddyControl property is set to an intrinsic control, the BuddyProperty returns an empty string in a compiled EXE. STATUS ====== Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATION ================ The BuddyProperty sets or returns the property used to synchronize the UpDown control with its buddy control. When the buddy control is a Visual Basic intrinsic control, the BuddyPropery returns a blank string in a compiled exe. The BuddyProperty works correctly in the IDE for intrinsic controls. It also returns the correct value in an EXE or the IDE if the BuddyControl property is set to an ActiveX control. Steps to Reproduce Behavior --------------------------- 1. Create a new standard EXE project. Form1 is created by default. 2. From the Project menu, select Components, check both "Microsoft Windows Common Controls" and "Microsoft Windows Common Controls-2," And then click OK. 2. Add two UpDown controls, a TextBox, a Slider, and a CommandButton to Form1. 3. Add the following code to the module of Form1: Private Sub Command1_Click() MsgBox "Updown1 BuddyPropery is " & UpDown1.BuddyProperty MsgBox "Updown2 BuddyPropery is " & UpDown2.BuddyProperty End Sub Private Sub Form_Load() UpDown1.BuddyControl = Text1 UpDown1.BuddyProperty = "text" UpDown2.BuddyControl = Slider1 UpDown2.BuddyProperty = "value" End Sub 4. From the File menu, Save the project and Make an EXE. 5. Run the project in the Visual Basic IDE and click on Command1, and note that the BuddyProperty returns the correct value for both Text1 and Slider1. 6. Run the compiled EXE from Windows Explorer and click on Command1. Note that the BuddyPropery only returns the correct value for Slider1 and not for Text1. Additional query words: kbDSupport kbDSD kbVBp kbVBp600bug kbVBp500bug kbCmnCtrls ====================================================================== Platform : WINDOWS Issue type : kbbug ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1998.