//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TMyDialogBox1 *MyDialogBox1;
//---------------------------------------------------------------------------
__fastcall TMyDialogBox1::TMyDialogBox1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: ShowModal2
// Property: Forms.TCustomForm.ModalResult
// Property: Forms.TCustomForm.ShowModal

// BeginCode
/*
The following methods are used for buttons in a form that is
used as a modal dialog box. The methods cause the dialog box
to terminate when the user clicks either the OK or Cancel
button, returning mrOk or mrCancel from ShowModal,
respectively. You could also set the ModalResult value to
mrOk for the OK button and mrCancel for the Cancel button to
accomplish the same thing. When the user clicks either
button, the dialog box closes.
*/
void __fastcall TMyDialogBox1::OKButtonClick(TObject *Sender)
{
  ModalResult = mrOk;
}

void __fastcall TMyDialogBox1::CancelButtonClick(TObject *Sender)
{
  ModalResult = mrCancel;
}
// EndCode
// EndExample: ShowModal2
//---------------------------------------------------------------------------
