Cowpod 1.0.3 -- source code
===========================

The full source for Cowpod, a pod manager for Monster Truck Madness 2.


WHAT IT IS

  Cowpod was written in Visual Basic 6.0 in 2005 and stayed that way through
  version 1.0.1. This is the same program ported to VB.NET.

    Language     VB.NET
    Framework    .NET Framework 4.8
    Platform     AnyCPU (runs 64-bit on 64-bit Windows)
    Built with   Visual Studio 2022 (Community edition is fine)

  The VB6 original is still available separately if you would rather read
  that, or are still working in VB6.


BUILDING

  Open CowpodNet\Cowpod.sln in Visual Studio 2022 and build. Or from a
  command prompt:

    msbuild CowpodNet\Cowpod.vbproj -t:Rebuild -p:Configuration=Release -p:Platform=AnyCPU

  You need the .NET Framework 4.8 targeting pack, which comes with the
  ".NET desktop development" workload in the Visual Studio installer.

  The output is a single self-contained Cowpod.exe. The icon and the toolbar
  images are embedded as resources at build time, so nothing has to ship
  beside it.


LAYOUT

  CowpodNet\Cowpod.sln        solution
  CowpodNet\Cowpod.vbproj     project
  CowpodNet\Forms\            the five windows, designer + code behind
  CowpodNet\Modules\          the program logic -- pods, pod.ini, paths,
                              registry, shortcuts, window sizing
  CowpodNet\Classes\          registry access, and Windows shortcuts
  CowpodNet\Controls\         list box wrappers that keep the VB6 list API
  CowpodNet\Resources\        icon and toolbar images, embedded at build time
  CowpodNet\VbCompat.vb       the VB6 "App" object, reimplemented
  CowpodNet\Startup.vb        entry point


NOTES ON THE PORT

  If you knew the VB6 version, these are the parts that are not a
  line-for-line translation:

  - CDLG.cls, around 1,400 lines of common dialog API code, was dropped
    entirely. .NET already provides those dialogs.
  - The registry class was rewritten on Microsoft.Win32.Registry, and is
    pinned to the 32-bit view of the registry so it still finds MTM2's keys
    when Cowpod is running as a 64-bit program.
  - Pod searching uses the .NET file APIs instead of FindFirstFile.
  - VB6 control arrays have no VB.NET equivalent. They are plain arrays wired
    up by hand, with the index kept in each control's Tag.
  - The VB6 ListBox API (List, ListCount, Selected, SelCount, AddItem...) is
    preserved behind wrapper controls, so the original list code still reads
    the way it did.
  - Option Strict is off. The port keeps VB6's loose typing in places rather
    than risk changing behaviour while moving language.
  - Settings are still read and written with GetSetting/SaveSetting, so an
    existing installation keeps its saved paths and options.


CREDITS

  The original program used three classes written by other people. Two of
  them survive in some form; the credit stands either way.

    cReadWriteEasyReg (6/6/1999) by Riaan Aspeling
        rewritten against the .NET registry classes, same idea
    CDLG.cls (3/14/2003) and Browse For Folder (10/14/2004) by DaVBMan
        retired -- .NET supplies both
    cShortcut.cls, from VB6 Project Consolidator (2/13/2004)
    by David Ross Goben
        still in use, still doing the same job

  Sorting method by Rick Meyer. File association details from Winterkill.
  Shell programming from the O'Reilly book. FindFilesAPI by Steve Anderson
  (retired along with the rest of the API file code). The ini file APIs, an
  icon extractor, and the analysis tools from Aivosto.


TERMS OF USE

  The code for Cowpod is released under conditions similar to those set out
  by the GNU project. Read it, learn from it, build something of your own
  with it -- credit your sources, keep your version open, and do not sell it.


(c) MTMG  -  MTM2.com, cownap.com
