home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / borland / cb / setup / cbuilder / data.z / SWITCH1.CPP < prev    next >
C/C++ Source or Header  |  1997-02-28  |  1KB  |  32 lines

  1. //----------------------------------------------------------------------------
  2. //Borland C++Builder
  3. //Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
  4. //----------------------------------------------------------------------------
  5. //---------------------------------------------------------------------
  6. #include <vcl.h>
  7. #pragma hdrstop
  8.  
  9. #include "Switch1.h"
  10. //---------------------------------------------------------------------
  11. #pragma resource "*.dfm"
  12. TForm1 *Form1;
  13. //---------------------------------------------------------------------
  14. __fastcall TForm1::TForm1(TComponent *Owner)
  15.     : TForm(Owner)
  16. {
  17. }
  18. //---------------------------------------------------------------------
  19. void __fastcall TForm1::Button1Click(TObject* /*Sender*/)
  20. {
  21.     MessageBox(NULL, "Event Hander # 1", "Hey", MB_OK);
  22.     Button1->OnClick = Button1Click2;
  23. }
  24. //----------------------------------------------------------------------------
  25. void __fastcall TForm1::Button1Click2(TObject* /*Sender*/)
  26. {
  27.     MessageBox(NULL, "Event Hander # 2", "There", MB_OK);
  28.     Button1->OnClick = Button1Click;
  29. }
  30. //----------------------------------------------------------------------------
  31.  
  32.