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

#include <vcl.h>
#pragma hdrstop

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

// BeginCode
/*
This code brings up the modal dialog from Unit2 when a
button is clicked.  It causes a Beep if the OK button is
clicked. Implement the modal form in Unit2 and then put
Unit2 in the uses clause for this module.
*/
#include "Unit2.h"
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  if (MyDialogBox1->ShowModal() == mrOk)
    MessageBeep(0);
}
// EndCode
// EndExample: ShowModal
//---------------------------------------------------------------------------
