Microsoft KB Archive/191719

= BUG: UpDown Control's BuddyProperty Returns Empty String in EXE =

Article ID: 191719

Article Last Modified on 5/13/2003

-

APPLIES TO


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

-



This article was previously published under Q191719



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
 Create a new standard EXE project. Form1 is created by default. From the Project menu, select Components, check both "Microsoft Windows Common Controls" and "Microsoft Windows Common Controls-2," And then click OK. Add two UpDown controls, a TextBox, a Slider, and a CommandButton to Form1.  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  From the File menu, Save the project and Make an EXE. 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.</li> 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.</li></ol>

Additional query words: kbDSupport kbDSD kbVBp kbVBp600bug kbVBp500bug kbCmnCtrls

Keywords: kbbug KB191719

-

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

© Microsoft Corporation. All rights reserved.