initial commit
[rofl0r-KOL.git] / demos / modalhide / Unit1.pas
blob65b1a2daafd8db34a27267293f2b0f57d0043a32
1 { KOL MCK } // Do not remove this line!
2 {$DEFINE KOL_MCK}
3 unit Unit1;
5 interface
7 {$IFDEF KOL_MCK}
8 uses Windows, Messages, ShellAPI, KOL {$IFNDEF KOL_MCK}, mirror, Classes,
9 Controls, mckCtrls {$ENDIF};
10 {$ELSE}
11 {$I uses.inc}
12 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
13 mirror;
14 {$ENDIF}
16 type
17 {$IFDEF KOL_MCK}
18 {$I MCKfakeClasses.inc}
19 PForm1 = ^TForm1;
20 TForm1 = object(TObj)
21 Form: PControl;
22 {$ELSE not_KOL_MCK}
23 TForm1 = class(TForm)
24 {$ENDIF KOL_MCK}
25 KOLProject1: TKOLProject;
26 KOLForm1: TKOLForm;
27 Button1: TKOLButton;
28 KOLApplet1: TKOLApplet;
29 Label1: TKOLLabel;
30 procedure Button1Click(Sender: PObj);
31 private
32 { Private declarations }
33 public
34 { Public declarations }
35 end;
37 var
38 Form1 {$IFDEF KOL_MCK} : PForm1 {$ELSE} : TForm1 {$ENDIF} ;
40 {$IFDEF KOL_MCK}
41 procedure NewForm1( var Result: PForm1; AParent: PControl );
42 {$ENDIF}
44 implementation
46 uses Unit2;
48 {$IFNDEF KOL_MCK} {$R *.DFM} {$ENDIF}
50 {$IFDEF KOL_MCK}
51 {$I Unit1_1.inc}
52 {$ENDIF}
54 procedure TForm1.Button1Click(Sender: PObj);
55 begin
56 Form2.Form.ShowModal;
57 Label1.Caption := 'ModalResult = ' + Int2Str( Form2.Form.ModalResult );
58 Form2.Form.Hide;
59 end;
61 end.