{ KOL MCK } // Do not remove this line!

procedure NewMainForm( var Result: PMainForm; AParent: PControl );
begin

  {$IFDEF KOLCLASSES}
  Result := PMainForm.Create;
  {$ELSE OBJECTS}
  New( Result, Create );
  {$ENDIF KOL CLASSES/OBJECTS}
  Result.Form := NewForm( AParent, 'MainForm' ).SetPosition( 326, 107 ){No MainMenu!}.SetClientSize( 673, 422 );
  Applet :=  Result.Form;
  Result.Form.Add2AutoFree( Result );
{$IFDEF UNICODE_CTRLS}
     Result.Form.SetUnicode(TRUE);
{$ENDIF UNICODE_CTRLS}
   {$IFDEF USE_NAMES}
    Result.Form.Name := 'MainForm';
   {$ENDIF}

    Result.AudioVerify := NewAudioVerify;
  Result.Form.Add2AutoFree( Result.AudioVerify );

    Result.MIDIPlayer := NewMIDIPlayer;
    Result.MIDIPlayer.Play;
  Result.Form.Add2AutoFree( Result.MIDIPlayer );

    Result.Mp4Tag := NewTagMp4;
  Result.Form.Add2AutoFree( Result.Mp4Tag );

    Result.TwinVQTag := NewTagTwinVQ;
  Result.Form.Add2AutoFree( Result.TwinVQTag );

    Result.VorbisTag := NewTagVorbis;
  Result.Form.Add2AutoFree( Result.VorbisTag );

    Result.ExWMATag := NewTagExWMA;
  Result.Form.Add2AutoFree( Result.ExWMATag );

    Result.WMATag := NewTagWMA;
  Result.Form.Add2AutoFree( Result.WMATag );

    Result.APETag := NewTagAPE;
  Result.Form.Add2AutoFree( Result.APETag );

    Result.ID3v2Tag := NewTagID3v2;
  Result.Form.Add2AutoFree( Result.ID3v2Tag );

    Result.ID3v1LyricsTag := NewTagID3v1Lyrics;
  Result.Form.Add2AutoFree( Result.ID3v1LyricsTag );

    Result.ID3v1Tag := NewTagID3v1;
  Result.Form.Add2AutoFree( Result.ID3v1Tag );

    Result.OpenSaveDialog := NewOpenSaveDialog( '', '', [  ] );
   {$IFDEF USE_NAMES}
    Result.OpenSaveDialog.Name := 'OpenSaveDialog';
   {$ENDIF}
  Result.Form.Add2AutoFree( Result.OpenSaveDialog );

    Result.MP4AudioInfo := NewAudioMP4;
  Result.Form.Add2AutoFree( Result.MP4AudioInfo );

    Result.MPEGplusAudioInfo := NewAudioMPEGplus;
  Result.Form.Add2AutoFree( Result.MPEGplusAudioInfo );

    Result.MPEGAudioInfo := NewAudioMPEG;
  Result.Form.Add2AutoFree( Result.MPEGAudioInfo );

    Result.CDATrackAudioInfo := NewAudioCDATrack;
  Result.Form.Add2AutoFree( Result.CDATrackAudioInfo );

    Result.TwinVQAudioInfo := NewAudioTwinVQ;
  Result.Form.Add2AutoFree( Result.TwinVQAudioInfo );

    Result.FLACAudioInfo := NewAudioFLAC;
  Result.Form.Add2AutoFree( Result.FLACAudioInfo );

    Result.WavAudioInfo := NewAudioWAV;
  Result.Form.Add2AutoFree( Result.WavAudioInfo );

    Result.WAVPackAudioInfo := NewAudioWAVPack;
  Result.Form.Add2AutoFree( Result.WAVPackAudioInfo );

    Result.MonkeyAudioInfo := NewAudioMonkey;
  Result.Form.Add2AutoFree( Result.MonkeyAudioInfo );

    Result.OggAudioInfo := NewAudioOGG;
  Result.Form.Add2AutoFree( Result.OggAudioInfo );

    Result.AC3AudioInfo := NewAudioAC3;
  Result.Form.Add2AutoFree( Result.AC3AudioInfo );

    Result.AACAudioInfo := NewAudioAAC;
  Result.Form.Add2AutoFree( Result.AACAudioInfo );

    Result.DTSAudioInfo := NewAudioDTS;
  Result.Form.Add2AutoFree( Result.DTSAudioInfo );

    Result.TTAAudioInfo := NewAudioTTA;
  Result.Form.Add2AutoFree( Result.TTAAudioInfo );

    Result.WMAAudioInfo := NewAudioWMA;
  Result.Form.Add2AutoFree( Result.WMAAudioInfo );

    Result.OptimFrogAudioInfo := NewAudioOptimFrog;
  Result.Form.Add2AutoFree( Result.OptimFrogAudioInfo );
    // Result.btnOpenAudio.TabOrder = 0
    Result.btnOpenAudio := NewButton( Result.Form, 'Open Audio' ).SetPosition( 544, 340 ).SetSize( 85, 29 );
   {$IFDEF USE_NAMES}
    Result.btnOpenAudio.Name := 'btnOpenAudio';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
    Result.btnOpenAudio.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    // Result.btnVerifyAudio.TabOrder = 0
    Result.btnVerifyAudio := NewButton( Result.Form, 'Verify Audio' ).SetPosition( 544, 380 ).SetSize( 85, 29 );
   {$IFDEF USE_NAMES}
    Result.btnVerifyAudio.Name := 'btnVerifyAudio';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
    Result.btnVerifyAudio.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    // Result.gbTags.TabOrder = 1
    Result.gbTags := NewGroupBox( Result.Form, 'Tags' ).SetPosition( 132, 332 ).SetSize( 401, 85 );
   {$IFDEF USE_NAMES}
    Result.gbTags.Name := 'gbTags';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
    Result.gbTags.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    Result.gbTags.TabStop := FALSE;
    // Result.btnOpenTag.TabOrder = 0
      Result.btnOpenTag := NewButton( Result.gbTags, 'Open Tag' ).SetPosition( 260, 16 ).SetSize( 129, 29 );
   {$IFDEF USE_NAMES}
      Result.btnOpenTag.Name := 'btnOpenTag';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.btnOpenTag.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    // Result.RadioBox1.TabOrder = 0
      Result.RadioBox1 := NewRadioBox( Result.gbTags, 'ID3v1' ).SetPosition( 8, 16 );
   {$IFDEF USE_NAMES}
      Result.RadioBox1.Name := 'RadioBox1';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.RadioBox1.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
      Result.RadioBox1.Tag := 1;
    // Result.RadioBox2.TabOrder = 0
      Result.RadioBox2 := NewRadioBox( Result.gbTags, 'ID3Lyrics' ).SetPosition( 8, 36 ).SetSize( 81, 0 );
   {$IFDEF USE_NAMES}
      Result.RadioBox2.Name := 'RadioBox2';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.RadioBox2.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
      Result.RadioBox2.Tag := 2;
    // Result.RadioBox3.TabOrder = 0
      Result.RadioBox3 := NewRadioBox( Result.gbTags, 'ID3v2' ).SetPosition( 8, 56 );
   {$IFDEF USE_NAMES}
      Result.RadioBox3.Name := 'RadioBox3';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.RadioBox3.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
      Result.RadioBox3.Tag := 3;
    // Result.RadioBox4.TabOrder = 0
      Result.RadioBox4 := NewRadioBox( Result.gbTags, 'APE' ).SetPosition( 92, 16 );
   {$IFDEF USE_NAMES}
      Result.RadioBox4.Name := 'RadioBox4';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.RadioBox4.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
      Result.RadioBox4.Tag := 4;
    // Result.RadioBox5.TabOrder = 0
      Result.RadioBox5 := NewRadioBox( Result.gbTags, 'Vorbis' ).SetPosition( 92, 36 );
   {$IFDEF USE_NAMES}
      Result.RadioBox5.Name := 'RadioBox5';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.RadioBox5.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
      Result.RadioBox5.Tag := 5;
    // Result.RadioBox6.TabOrder = 0
      Result.RadioBox6 := NewRadioBox( Result.gbTags, 'TwinVQ' ).SetPosition( 92, 55 );
   {$IFDEF USE_NAMES}
      Result.RadioBox6.Name := 'RadioBox6';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.RadioBox6.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
      Result.RadioBox6.Tag := 6;
    // Result.RadioBox7.TabOrder = 0
      Result.RadioBox7 := NewRadioBox( Result.gbTags, 'WMA' ).SetPosition( 176, 16 );
   {$IFDEF USE_NAMES}
      Result.RadioBox7.Name := 'RadioBox7';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.RadioBox7.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
      Result.RadioBox7.Tag := 7;
    // Result.RadioBox8.TabOrder = 0
      Result.RadioBox8 := NewRadioBox( Result.gbTags, 'ExWMA' ).SetPosition( 176, 36 );
   {$IFDEF USE_NAMES}
      Result.RadioBox8.Name := 'RadioBox8';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.RadioBox8.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
      Result.RadioBox8.Tag := 8;
    // Result.RadioBox9.TabOrder = 0
      Result.RadioBox9 := NewRadioBox( Result.gbTags, 'Mp4' ).SetPosition( 176, 55 );
   {$IFDEF USE_NAMES}
      Result.RadioBox9.Name := 'RadioBox9';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.RadioBox9.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
      Result.RadioBox9.Tag := 9;
    // Result.Memo.TabOrder = 2
    Result.Memo := NewEditBox( Result.Form, [ eoMultiline ] ).SetAlign ( caTop ).SetSize( 0, 323 );
   {$IFDEF USE_NAMES}
    Result.Memo.Name := 'Memo';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
    Result.Memo.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    // Result.GroupBox1.TabOrder = 3
    Result.GroupBox1 := NewGroupBox( Result.Form, ' MIDI ' ).SetPosition( 4, 332 ).SetSize( 121, 85 );
   {$IFDEF USE_NAMES}
    Result.GroupBox1.Name := 'GroupBox1';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
    Result.GroupBox1.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    Result.GroupBox1.TabStop := FALSE;
    // Result.btnPlayMidi.TabOrder = 2
      Result.btnPlayMidi := NewButton( Result.GroupBox1, 'Load' ).SetPosition( 8, 19 ).SetSize( 49, 29 );
   {$IFDEF USE_NAMES}
      Result.btnPlayMidi.Name := 'btnPlayMidi';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.btnPlayMidi.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    // Result.Button1.TabOrder = 2
      Result.Button1 := NewButton( Result.GroupBox1, 'Pause' ).SetPosition( 60, 19 ).SetSize( 49, 29 );
   {$IFDEF USE_NAMES}
      Result.Button1.Name := 'Button1';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.Button1.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    // Result.Button2.TabOrder = 2
      Result.Button2 := NewButton( Result.GroupBox1, 'Stop' ).SetPosition( 8, 48 ).SetSize( 49, 29 );
   {$IFDEF USE_NAMES}
      Result.Button2.Name := 'Button2';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.Button2.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    // Result.Button3.TabOrder = 2
      Result.Button3 := NewButton( Result.GroupBox1, 'Play' ).SetPosition( 60, 48 ).SetSize( 49, 29 );
   {$IFDEF USE_NAMES}
      Result.Button3.Name := 'Button3';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.Button3.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
      Result.btnOpenAudio.OnClick := Result.btnOpenAudioClick;
      Result.OpenSaveDialog.WndOwner := Result.Form.GetWindowHandle;
      Result.btnOpenTag.OnClick := Result.btnOpenTagClick;
      Result.btnVerifyAudio.OnClick := Result.btnVerifyAudioClick;
      Result.btnPlayMidi.OnClick := Result.btnPlayMidiClick;
      Result.Button1.OnClick := Result.Button1Click;
      Result.Button2.OnClick := Result.Button2Click;
      Result.Button3.OnClick := Result.Button3Click;
    Result.Memo.Color := clWindow;

end;

