initial commit
[rofl0r-KOL.git] / demos / modalvcl2koldll / KOLUnit1.pas
blob3460b285bf19e4fd55efe07c0086ae8a4603efb8
1 { KOL MCK } // Do not remove this line!
2 {$DEFINE KOL_MCK}
3 unit KOLUnit1;
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 PKOLForm1 = ^TKOLForm1;
20 TKOLForm1 = object(TObj)
21 Form: PControl;
22 {$ELSE not_KOL_MCK}
23 TKOLForm1 = class(TForm)
24 {$ENDIF KOL_MCK}
25 KOLProject1: TKOLProject;
26 KOLForm1: TKOLForm;
27 Button1: TKOLButton;
28 KOLApplet1: TKOLApplet;
29 procedure Button1Click(Sender: PObj);
30 private
31 { Private declarations }
32 public
33 { Public declarations }
34 end;
36 var
37 KOLForm1 {$IFDEF KOL_MCK} : PKOLForm1 {$ELSE} : TKOLForm1 {$ENDIF} ;
39 procedure CallKOLFormModal; export;
41 {$IFDEF KOL_MCK}
42 procedure NewKOLForm1( var Result: PKOLForm1; AParent: PControl );
43 {$ENDIF}
45 implementation
47 {$IFNDEF KOL_MCK} {$R *.DFM} {$ENDIF}
49 {$IFDEF KOL_MCK}
50 {$I KOLUnit1_1.inc}
51 {$ENDIF}
53 procedure CallKOLFormModal;
54 begin
55 NewKOLForm1( KOLForm1, Applet );
56 KOLForm1.Form.ShowModal;
57 KOLForm1.Form.Free;
58 KOLForm1 := nil;
59 end;
61 procedure TKOLForm1.Button1Click(Sender: PObj);
62 begin
63 Form.ModalResult := 1;
64 Form.Close;
65 end;
67 end.