{ 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, 'ATL DEMO' ).SetPosition( 142, 91 ){No MainMenu!}.SetClientSize( 1038, 764 );
  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.Panel1.TabOrder = 0
    Result.Panel1 := NewPanel( Result.Form, esNone ).SetAlign ( caClient );
   {$IFDEF USE_NAMES}
    Result.Panel1.Name := 'Panel1';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
    Result.Panel1.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    // Result.Label10.TabOrder = -1
      Result.Label10 := NewLabel( Result.Panel1, '' ).SetAlign ( caTop ).SetSize( 0, 51 ).MakeWordWrap;
   {$IFDEF USE_NAMES}
      Result.Label10.Name := 'Label10';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.Label10.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    // Result.lbFormatInfo.TabOrder = 0
      Result.lbFormatInfo := NewListBox( Result.Panel1, [ loMultiColumn, loNoIntegralHeight ] ).SetAlign ( caBottom ).SetSize( 0, 162 );
   {$IFDEF USE_NAMES}
      Result.lbFormatInfo.Name := 'lbFormatInfo';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.lbFormatInfo.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    Result.lbFormatInfo.Color := clWindow;
      Result.lbFormatInfo.CurIndex := 0;
    // Result.BAPFileBrowser.TabOrder = 1
      Result.BAPFileBrowser := NewBAPFileBrowser(Result.Panel1, lvsList, [fbcSize, fbcDate], ' ', sdrByExt, False, True);
      Result.BAPFileBrowser.SetAlign ( caClient );
    Result.BAPFileBrowser.Color := clWindow;
      Result.BAPFileBrowser.LVColText[0] := 'Name';
      Result.BAPFileBrowser.LVColWidth[0] := 202;
      Result.BAPFileBrowser.LVColText[1] := 'Size';
      Result.BAPFileBrowser.LVColWidth[1] := 102;
      Result.BAPFileBrowser.LVColText[2] := 'Date';
      Result.BAPFileBrowser.LVColWidth[2] := 84;
      Result.BAPFileBrowser.Directory := '*';
    // Result.BAPDriveBox1.TabOrder = 6
      Result.BAPDriveBox1 := NewBAPDriveBox(Result.Panel1, False);
      Result.BAPDriveBox1.SetAlign ( caTop ).SetSize( 0, 24 );
    Result.BAPDriveBox1.Color := clWindow;
    // Result.Panel2.TabOrder = 1
    Result.Panel2 := NewPanel( Result.Form, esRaised ).SetAlign ( caRight ).SetSize( 560, 0 );
   {$IFDEF USE_NAMES}
    Result.Panel2.Name := 'Panel2';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
    Result.Panel2.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    // Result.Panel3.TabOrder = 0
      Result.Panel3 := NewPanel( Result.Panel2, esLowered ).SetAlign ( caBottom ).SetSize( 0, 36 );
   {$IFDEF USE_NAMES}
      Result.Panel3.Name := 'Panel3';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.Panel3.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
      Result.Panel3.Border := 4;
    // Result.btnDelMyTeg.TabOrder = 0
        Result.btnDelMyTeg := NewButton( Result.Panel3, 'Del Teg+' ).SetAlign ( caRight ).SetSize( 77, 0 );
   {$IFDEF USE_NAMES}
        Result.btnDelMyTeg.Name := 'btnDelMyTeg';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
        Result.btnDelMyTeg.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
        Result.btnDelMyTeg.Tag := 3;
    // Result.btnShowMyTeg.TabOrder = 1
        Result.btnShowMyTeg := NewButton( Result.Panel3, 'Show Teg+' ).SetAlign ( caRight ).SetSize( 77, 0 );
   {$IFDEF USE_NAMES}
        Result.btnShowMyTeg.Name := 'btnShowMyTeg';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
        Result.btnShowMyTeg.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
        Result.btnShowMyTeg.Tag := 2;
    // Result.btnAddMyTeg.TabOrder = 2
        Result.btnAddMyTeg := NewButton( Result.Panel3, 'Add Teg+' ).SetAlign ( caRight ).SetSize( 77, 0 );
   {$IFDEF USE_NAMES}
        Result.btnAddMyTeg.Name := 'btnAddMyTeg';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
        Result.btnAddMyTeg.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
        Result.btnAddMyTeg.Tag := 1;
    // Result.btnSave.TabOrder = 3
        Result.btnSave := NewButton( Result.Panel3, 'Save' ).SetAlign ( caLeft ).SetSize( 93, 0 );
   {$IFDEF USE_NAMES}
        Result.btnSave.Name := 'btnSave';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
        Result.btnSave.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    // Result.sbTags.TabOrder = 1
      Result.sbTags := NewScrollBoxEx( Result.Panel2, esLowered ).SetAlign ( caClient );
   {$IFDEF USE_NAMES}
      Result.sbTags.Name := 'sbTags';
   {$ENDIF}
   {$IFDEF UNICODE_CTRLS}
      Result.sbTags.SetUnicode(TRUE);
   {$ENDIF UNICODE_CTRLS}
    Result.sbTags.Font.FontHeight := 12;
      Result.sbTags.Border := 1;
      Result.btnDelMyTeg.OnClick := Result.btnMyTegClick;
      Result.BAPFileBrowser.OnSelFile := Result.BAPFileBrowserSelFile;
      Result.btnShowMyTeg.OnClick := Result.btnMyTegClick;
      Result.btnAddMyTeg.OnClick := Result.btnMyTegClick;
      Result.btnSave.OnClick := Result.btnSaveClick;
      Result.BAPDriveBox1.OnChangeDrive := Result.BAPDriveBox1ChangeDrive;

end;

