Class TForm1 (unit Midimonp)

Inherits from

TForm

Constructors



Functions

procedure CloseDevs;

Open devices

procedure cmbInputChange(Sender: TObject);


procedure FormClose(Sender: TObject; var Action: TCloseAction);

If there are currently more items than the max, remove them otherwise the list will have scrollbars when resized

procedure FormCreate(Sender: TObject);


procedure FormResize(Sender: TObject);

Load the lists of installed MIDI devices

procedure LogMessage(ThisEvent:TMyMidiEvent);


procedure MIDIInput1MidiInput(Sender: TObject);

Logging MIDI messages with a Windows list box is rather slow and ugly, but it makes the example very simple.

procedure mnuExitClick(Sender: TObject);

This is not strictly necessary since the objects close themselves when the form containing them is destroyed

procedure OpenDevs;

Event was dynamically created by GetMyMidiEvent so must free it here

Properties

Events

Variables

Bevel1 : TBevel;


cmbInput : TComboBox;


cmbOutput : TComboBox;


File1 : TMenuItem;


Label1 : TLabel;


lstLog : TListBox;


MainMenu1 : TMainMenu;


MIDIInput1 : TMIDIInput;


MidiOutput1 : TMidiOutput;


mnuExit : TMenuItem;


pnlColumnHeading : TPanel;


logItemMax : Integer;



Constructors


Functions


procedure CloseDevs;

Open devices


procedure cmbInputChange(Sender: TObject);


procedure FormClose(Sender: TObject; var Action: TCloseAction);

If there are currently more items than the max, remove them otherwise the list will have scrollbars when resized


procedure FormCreate(Sender: TObject);


procedure FormResize(Sender: TObject);

Load the lists of installed MIDI devices


procedure LogMessage(ThisEvent:TMyMidiEvent);


procedure MIDIInput1MidiInput(Sender: TObject);

Logging MIDI messages with a Windows list box is rather slow and ugly, but it makes the example very simple. If you need a faster and less flickery log you could port the rest of Microsoft's MIDIMON.C example.


procedure mnuExitClick(Sender: TObject);

This is not strictly necessary since the objects close themselves when the form containing them is destroyed


procedure OpenDevs;

Event was dynamically created by GetMyMidiEvent so must free it here


Properties


Events


Variables


Bevel1 : TBevel;


cmbInput : TComboBox;


cmbOutput : TComboBox;


File1 : TMenuItem;


Label1 : TLabel;


lstLog : TListBox;


MainMenu1 : TMainMenu;


MIDIInput1 : TMIDIInput;


MidiOutput1 : TMidiOutput;


mnuExit : TMenuItem;


pnlColumnHeading : TPanel;


logItemMax : Integer;