Microsoft KB Archive/94717

-

{| The information in this article applies to:
 * width="100%"|
 * Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c

SUMMARY
When you create a custom dialog box in Word for Windows, the maximum width is 5000 units. However, if you try to place items, such as buttons or list boxes, beyond 1022 units in the horizontal X position, the items do not appear in the correct location. Instead, they appear approximately 480 units from the edge of the dialog box. Combo boxes display incorrectly when you place items beyond 1014 units in the X position.

STATUS
Microsoft has confirmed this to be a problem in the versions of Microsoft Word for Windows listed above. We are researching this problem, and will post more information here in the Microsoft Knowledge Base as it becomes available.

Steps to Reproduce Problem
The following macro demonstrates that items placed at 1022 units (1014 units for combo boxes) display correctly. After you choose the OK button in the first dialog box, the macro then demonstrates that the same items display incorrectly when placed at 1023 units (1015 units for combo boxes).

Note: Word 6.0 will get a syntax error if a listbox or combobox are declared in the dialog box and an array has not been declared first. Add the following three lines to the macro, after Sub Main below:

Dim ListBox1$(0), ComboBox1$(0) ListBox1$(0)= &quot;List&quot; ComboBox1$(0) = &quot;Combo&quot;

Sub MAIN Over = 1022 comboOver = 1014 For i = 1 To 2 Begin Dialog UserDialog 1200, 434, &quot;Microsoft Word&quot; Text 8, 28, 253, 13, &quot;X position =&quot; + Str$(over) Text 8, 47, 263, 13, &quot;Combobox X position =&quot; + Str$(comboOver) OKButton 6, 68, 88, 21 ListBox over, 6, 100, 84, ListBox1$, .ListBox1 OptionGroup .OptionGroup1 OptionButton over, 91, 100, 16, &quot;Option Button&quot; CheckBox over, 108, 100, 16, &quot;Check Box&quot;, .CheckBox1 GroupBox over, 130, 100, 108, &quot;Group Box&quot; ComboBox comboOver, 247, 100, 108, ComboBox1$, .ComboBox1 PushButton over, 358, 100, 21, &quot;Text&quot; End Dialog Dim dlg As UserDialog Dialog dlg Over = 1023 comboOver = 1015 Next End Sub Kbcategory: kbusage kbmacro KBSubcategory:
 * }

-

Last reviewed: July 30, 1997

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.