Microsoft KB Archive/69855

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 18:58, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

User-Defined Dialog Boxes and the Macro Editor in WinWord PSS ID Number: Q69855 Article last modified on 07-14-1994

1.00 1.10 1.10a 2.00

WINDOWS

The information in this article applies to:
- Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, and 2.0

Summary:

The following information discusses the Microsoft Word for Windows macro editor, and how to use dialog boxes in macros. Also included are key error messages that Word for Windows may generate when forming a dialog box.

More Information:

  1. The maximum size of a user-defined dialog box is 510 x 380 for Word for Windows versions 1.0, 1.1, and 1.1a. The maximum size of a user-defined dialog box is 2046 x 1535 for Word for Windows version 2.0. The units used to size a dialog box are as follows:

    width = 1/8 system font height = 1/12 system font

    The following are sample macro lines:

    Begin Dialog UserDialog 510, 380

    -or-

    Begin Dialog UserDialog 2046, 1535

    The error generated by an oversized box is as follows:

    WordBASIC Err=5: Illegal function call

    Word highlights the problematic line in the macro.

  2. The maximum number of characters that can be displayed in a message box is 255. If you exceed this limit, version 1.x of Word generates the following error message:

    Message too long

    Choosing the Start button on the menu bar immediately after the message displays truncates your message box, and displays the first 255 characters.

    If the maximum number of characters is exceeded for the message in version 2.0 of Word, the following message is generated:

    WordBASIC Err=513: String too long

  3. The maximum number of items that can be displayed in a user-defined dialog box is 18 for Word for Windows 1.0, 1.1, and 1.1a. For Word for Windows 2.0, the maximum is 32. You can use any combination of OptionButtons, CheckBoxes, TextBoxes, ListBoxes, ComboBoxes, or Buttons. If you exceed this limit, you receive the following error message:

    WordBASIC error=530: Dialog Box description too complex

    Word highlights the last item that is trying to be displayed.

  4. Not defining an OK and/or Cancel button in a user-defined dialog box causes the box not to display; however, it does not generate any error message in Word for Windows versions 1.0, 1.1, and 1.1a.

    Not defining a button in a user-defined dialog box in Word for Windows version 2.0 results in the following error message:

    WordBASIC error=5: Illegal function call

  5. User-defined dialog boxes use the system fixed font as a default. If you have an EGA monitor, your system font is EGAFIX.FON, the same as the font on the Word for Windows menu bar and the Windows menu bar. Changing the font requires globally changing the system font in the SYSTEM.INI file in the [BOOT] section. The “Fonts.Fon=” denotes the font that is currently being used. In extreme cases, it can be changed, but it is not recommended. 8514SYS.FON is the largest font in height, followed by VGASYS.FON, and then EGASYS.FON. See below for a more detailed explanation.

  6. The Word for Windows macro editor is a monofont editor. Monofont means there are no bold formatting, highlighting, or other font style changes. The normal font used is Times Roman (TMRSX.FON), where X denotes the type of font (B=EGA E=VGA F=8514). These font files are all functions of pixels, meaning the EGA (640 x 350) pixel size is larger than the VGA (640 x 480) pixel size, and the VGA (640 x 480) pixels size is larger than the 8514 (1024 x 768) pixel size.

    “>” denotes greater than. For example, EGA-pixels size > VGA-pixels size > 8514-pixels size.

To change the editor’s font, modify the [FONTS] section of the WIN.INI file. This change does not only affect Word for Windows, it also has a global effect on how Windows functions. Below are some results of changing the WIN.INI file.

Monitor Normal Font Appearance ————————————————–

EGA TMRSB.FON Normal size EGA TMRSE.FON Larger than normal EGA TMRSF.FON Much larger than normal VGA TMRSE.FON Normal size VGA TMRSF.FON Larger than normal VGA TMRSB.FON Smaller than normal 8514 TMRSF.FON Normal size 8514 TMRSE.FON Smaller than normal 8514 TMRSB.FON Much smaller than normal

Make sure the specific font file is already in expanded form before making any changes, or Windows does not restart.

Reference(s):

“Microsoft Word for Windows and OS/2 Technical Reference,” pages 74-94

Additional reference words: w4wmacro error err macro editor winword dialogbox userdefined user defined 1.00 1.10 1.10a 1.0 1.1 1.1a 2.00

=================================================================

Copyright Microsoft Corporation 1994.