ID: Q95830
1.00 2.00 3.00 WINDOWS
 kbbuglist
- Standard and Professional Editions of Microsoft Visual Basic for
  Windows, versions 2.0 and 3.0
A Stack Fault results if a Move method changes the Width property of a combo box containing two to eight items to a small value.
The optional third parameter to the Move method changes the width property of the control to which the method applies. Applying the method to the combo box with a third parameter of less then 240 when the scale mode is set to twips, produces a Stack Fault Application Error halting the execution of your application.
Changing the Width property, by using the Move method or by setting the property directly, to a value as small as 240 practically eliminates the functionality of the control. At this width, the combo box is barely wide enough to view the drop-down button. Hence no entries in the combo box are visible to the user.
If want your application to move the control to a position where the user can not view the control at that instant, use one of these techniques:
1. Set the Visible property of the combo box to False. 2. Set the Top and Left properties of the combo box to position the control
   outside the visible region of the Form.
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem has been corrected in Visual Basic version 4.0.
The Application Error dialog box indicates that Visual Basic caused the Stack Fault in USER.EXE. However the address differs depending on the version of Visual Basic. In version 2.00, the address is 0007:0CA3. In version 1.00, the address is 0001:707A.
1. Start Visual Basic or from the File menu, choose New Project (ALT, F, N)
   if Visual Basic is already running. Form1 is created by default.
3. Place the following code in the Form_Click event procedure:
   Sub Form_Click ()
      combo1.AddItem "Item 1"
      combo1.AddItem "Item 2"  ' Add two items to combo1
      combo1.Move 0, 0, 240    ' New position = (0,0);Width = 240
   End Sub
5. Using the mouse, click Form1. At this point, the combo box moves to the
   upper-left corner of Form1 and its width changes to 240 twips (The
   default ScaleMode).
   stating the following:
      VB caused a Stack Fault in module USER.EXE at 0007:0CA3
   Running Visual Basic version 1.00 displays a similar message with an
   address of 0001:707A.
Keywords          : kbenv EnvtRun kbbuglist
Version           : 1.00 2.00 3.00
Platform          : WINDOWS
Solution Type     : kbfixLast Reviewed: May 14, 1998