BUG: Stack Fault When Move Sets Tiny Width in 2-Item Combo Box

ID: Q95197


The information in this article applies to:
  • Microsoft Visual Basic Standard and Professional Editions for Windows, versions 2.0, 3.0


SYMPTOMS

An Application Error saying that Visual Basic caused a stack fault occurs when you click the down arrow of a combo box if the combo box contains two items and you set the Width property of the combo box to less than 378 from within a Move method. The number it takes to cause the problem depends on your current video mode. This example uses a 1224 by 768 driver. The lower your resolution, the higher the number must be to prevent the Application Error.


WORKAROUND

To work around this problem, set the width of the combo box to 377 in design mode, and don't set it from within a Move method. As another alternative, you can remove one of the two items in the Combo Box.


STATUS

Microsoft has confirmed this to be a bug in Visual Basic versions 2.0 and 3.0 for Windows. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


MORE INFORMATION

Steps to Reproduce Problem

  1. Start Visual Basic or if Visual Basic is already running, choose New Project from the File menu (ALT, F, N). Form1 is created by default.


  2. Add a combo box (Combo1) to Form1.


  3. Add the following code to the Form1_Load event:
    
       Sub Form_Load()
         Combo1.additem "Item 1"
         Combo1.additem "Item 2"
         Combo1.Move 100, 100, 377 ' Postion 100, 100, with a width of 382
       End Sub 


  4. From the file menu, choose Run to run the program.


  5. Click the down arrow of the combo box.


This results in an Application Error stating a stack fault occurred.

Additional query words: buglist2.00 buglist3.00 2.00 3.00

Keywords :
Version : WINDOWS:2.0,3.0
Platform : WINDOWS
Issue type :


Last Reviewed: January 25, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.