home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
SWITCH1.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
1KB
|
32 lines
//----------------------------------------------------------------------------
//Borland C++Builder
//Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
//----------------------------------------------------------------------------
//---------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Switch1.h"
//---------------------------------------------------------------------
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent *Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject* /*Sender*/)
{
MessageBox(NULL, "Event Hander # 1", "Hey", MB_OK);
Button1->OnClick = Button1Click2;
}
//----------------------------------------------------------------------------
void __fastcall TForm1::Button1Click2(TObject* /*Sender*/)
{
MessageBox(NULL, "Event Hander # 2", "There", MB_OK);
Button1->OnClick = Button1Click;
}
//----------------------------------------------------------------------------