Skip to content

Windows 3.1

The win31 pack imitates Windows 3.1 and Windows for Workgroups 3.11 (1992–1993), the 16-bit Windows that put Program Manager, File Manager and the common dialogs on millions of VGA screens. It uses the Windows Default colour scheme: a teal desktop, navy caption bars with the control-menu box and the minimize/maximize arrows, the thick grey sizing border, white client areas and dialogs, push buttons with their two-pixel bevel and the heavy outline on the default button, check boxes with an X, round radio buttons, scroll bars with arrow boxes, and everything set in the bold System font. Select it with import Windows31 (also Win31, Win16) or pack="win31" on the fence; the default device is an 800 × 600 SVGA screen, and chrome="none" turns the screen into the desktop for composing several windows.

The elements use Win16 vocabulary: Window, ProgramManager, ProgramGroup, ProgramItem, MenuBar, Menu, MenuItem, Button (.variant(.default) is the DEFPUSHBUTTON), CheckBox, RadioButton, GroupBox, Edit, MultiLineEdit, ListBox, ComboBox, ScrollBar, Static, DialogBox, MessageBox, FileManager, DriveBar, DirectoryTree, FileList, Notepad, Cardfile with IndexCard, Calculator, Clock, StatusBar — and, for the nostalgic, the resource-script spellings DEFPUSHBUTTON, LTEXT, GROUPBOX, EDITTEXT, LISTBOX. appearance: dark switches to a High Contrast Black scheme, which 3.1 did not ship in quite this form but would have liked to.

Program Manager

The shell itself: Program Manager on the desktop, the Main group active, Accessories behind it, the other groups minimized along the bottom, and Clock running minimized on the desktop.

Program Manager
Accessories
WritePaintbrushTerminalNotepadRecorderCardfileCalendarCalculatorClockObject PackagerCharacter MapMedia Player
Main
File ManagerControl PanelPrint ManagerClipboard ViewerMS-DOS PromptWindows SetupPIF EditorRead Me
NetworkStartUpGamesApplications
ClockWrite - LETTER.WRI
Program Manager
Source
import "win31/apps"

Desktop {
  ProgramManager {
    ProgmanMenuBar()
    MDIClient {
      GroupWindow(title: "Accessories", inactive: true) {
        ProgramItem("Write", icon: "pencil")
        ProgramItem("Paintbrush", icon: "photo").color(.red)
        ProgramItem("Terminal", icon: "phone")
        ProgramItem("Notepad", icon: "doc")
        ProgramItem("Recorder", icon: "video").color(.purple)
        ProgramItem("Cardfile", icon: "square.grid.2x2").color(.brown)
        ProgramItem("Calendar", icon: "calendar").color(.green)
        ProgramItem("Calculator", icon: "number")
        ProgramItem("Clock", icon: "clock").color(.green)
        ProgramItem("Object Packager", icon: "cube").color(.purple)
        ProgramItem("Character Map", icon: "square.grid.3x3")
        ProgramItem("Media Player", icon: "play").color(.red)
      }
      .frame(width: 400, height: 250)
      .offset(x: 250, y: 120)

      GroupWindow(title: "Main") {
        ProgramItem("File Manager", icon: "folder").color(.yellow).selected()
        ProgramItem("Control Panel", icon: "slider.horizontal.3").color(.green)
        ProgramItem("Print Manager", icon: "printer")
        ProgramItem("Clipboard Viewer", icon: "doc.on.doc").color(.purple)
        ProgramItem("MS-DOS Prompt", icon: "app")
        ProgramItem("Windows Setup", icon: "wrench").color(.brown)
        ProgramItem("PIF Editor", icon: "pencil").color(.green)
        ProgramItem("Read Me", icon: "doc").color(.blue)
      }
      .frame(width: 360, height: 200)
      .offset(x: 16, y: 14)

      HStack(spacing: 4) {
        ProgramGroupIcon("Network")
        ProgramGroupIcon("StartUp")
        ProgramGroupIcon("Games")
        ProgramGroupIcon("Applications")
        Spacer()
      }
      .padding(6)
    }
  }
  .frame(width: 700, height: 470)
  .offset(x: 40, y: 24)

  DesktopIcon("Clock", icon: "clock").color(.green).offset(x: 24, y: 512)
  DesktopIcon("Write - LETTER.WRI", icon: "pencil").offset(x: 110, y: 512)
}

Notepad

Notepad with its File menu dropped down. Menu titles and items underline their mnemonic letter; the highlighted item uses the navy selection colour.

Notepad - README.TXT
README.TXT
==========

Welcome to Microsoft Windows version 3.1.

This document contains important information that is not included
in the Microsoft Windows User's Guide or in Help.

If you are upgrading from Windows 3.0, read the section
"Upgrading Your System" before you run Setup.

To print this document, choose Print from the File menu.
Light
Notepad - README.TXT
README.TXT
==========

Welcome to Microsoft Windows version 3.1.

This document contains important information that is not included
in the Microsoft Windows User's Guide or in Help.

If you are upgrading from Windows 3.0, read the section
"Upgrading Your System" before you run Setup.

To print this document, choose Print from the File menu.
Dark
Notepad - README.TXT

File Manager

File Manager with one directory window open on drive C. The drive bar 1 lists the floppy, hard and network drives with the current one outlined; the directory tree 2 shows the selected directory as an open folder; the file list 3 separates programs from documents by their icons; and the status bar 4 reports free space and the selection — all in lowercase, as 8.3 file names were meant to be read.

File Manager
C:\WINDOWS*. *
c:\
dos
excel
mouse
temp
windows
msapps
system
winword
2
msapps
system
calc.exe43,072
cardfile.exe93,184
clock.exe16,416
control.exe13,280
notepad.exe32,736
progman.exe115,312
winfile.exe146,864
control.ini4,215
progman.ini183
system.ini2,281
win.ini6,840
readme.wri46,975
386spart.par8,192,000
3
1
2
3
4
File Manager

A dialog box with every control

Control Panel's Desktop applet, the classic kitchen-sink dialog: group boxes, drop-down combo boxes, edits, check boxes with an X, round radio buttons, push buttons with the heavy outline on the default one, the dotted focus rectangle, and a scroll bar used as a slider.

Desktop
Source
import "win31/apps"

DialogBox("Desktop", placement: .trailing) {
  GroupBox("Pattern") {
    HStack(spacing: 8) {
      Static("Name:")
      DropDownList(selection: "(None)").frame(width: 150)
      Button("Edit Pattern...")
    }
  }
  GroupBox("Applications") {
    CheckBox("Fast \"Alt+Tab\" Switching", checked: true).state(.focused)
  }
  GroupBox("Screen Saver") {
    HStack(spacing: 8) {
      Static("Name:")
      DropDownList(selection: "Flying Windows").frame(width: 150)
      Button("Test")
    }
    HStack(spacing: 8) {
      Static("Delay:")
      Edit("2").frame(width: 40)
      Static("Minutes")
      Spacer()
      Button("Setup...")
    }
  }
  HStack(alignment: .top, spacing: 10) {
    GroupBox("Wallpaper") {
      HStack(spacing: 6) {
        Static("File:")
        ComboBox(selection: "leaves.bmp").frame(width: 110)
      }
      HStack(spacing: 16) {
        RadioButton("Center")
        RadioButton("Tile", checked: true)
      }
    }
    GroupBox("Icons") {
      HStack(spacing: 6) {
        Static("Spacing:")
        Edit("75").frame(width: 40)
        Static("Pixels")
      }
      CheckBox("Wrap Title", checked: true)
    }
  }
  HStack(alignment: .top, spacing: 10) {
    GroupBox("Sizing Grid") {
      HStack(spacing: 6) {
        Static("Granularity:")
        Edit("0").frame(width: 40)
      }
      HStack(spacing: 6) {
        Static("Border Width:")
        Edit("3").frame(width: 40)
      }
    }
    GroupBox("Cursor Blink Rate") {
      HStack(spacing: 6) {
        Static("Slow")
        ScrollBar(value: 0.55).frame(width: 86)
        Static("Fast")
      }
    }
  }
} actions: {
  DialogButtons()
}

Message boxes

A MessageBox takes the four Win16 icons — .stop, .exclamation, .information and .question — and centres its buttons under the text. Here Excel 4.0 asks the eternal question over a worksheet and an embedded Microsoft Graph chart in the sixteen-colour palette.

Microsoft Excel - SALES.XLS
B3fx980
ABCDE
1RegionQ1Q2Q3Q4
2North1240131015251690
3South980104511101302
4East1420138814601611
5West76091210041189
6Total4400465550995792
7
8
9
10
11
12
13
14
15
Sales by Quarter
NorthSouthEastWest
Microsoft Excel

Control Panel: Color

The Color applet with the palette expanded: pick a scheme, preview it in the sample, or change a single screen element from the 48 basic colours.

Color

Cardfile

Cardfile keeps a stack of index cards: only the index lines of the cards behind show, the front card is open for editing, and the status line counts the cards.

Cardfile - PHONE.CRD
Wilson, Grace
Patel, Dev
Okafor, Chidi
Lindqvist, Maja
Garcia, Luis
Chen, Wei
Brown, Ana
Contoso Ltd.
Phone: (206) 555-0134
Fax: (206) 555-0135

Birthday: April 6
Prefers e-mail over fax.
Ask about the WfW 3.11 upgrade.
Light
Cardfile - PHONE.CRD
Wilson, Grace
Patel, Dev
Okafor, Chidi
Lindqvist, Maja
Garcia, Luis
Chen, Wei
Brown, Ana
Contoso Ltd.
Phone: (206) 555-0134
Fax: (206) 555-0135

Birthday: April 6
Prefers e-mail over fax.
Ask about the WfW 3.11 upgrade.
Dark
Cardfile - PHONE.CRD