source: branches/Xvcl/Drivers/Driver.SystemVCL.pas

Last change on this file was 19, checked in by chronos, 12 years ago
  • Added: Test implementation of custom VCL classes adapted to be used with virtual OS.
File size: 947 bytes
Line 
1unit Driver.SystemVCL;
2
3interface
4
5uses
6 Vcl.Forms, Xvcl.Kernel;
7
8type
9 TDriverSystemVCL = class(TDriver)
10 private
11 ProcessVCL: TProcess;
12 procedure DoTick(Sender: TObject);
13 procedure DoAfterDriverInit(Sender: TObject);
14 public
15 procedure Initialize; override;
16 procedure Finalize; override;
17 end;
18
19
20implementation
21
22{ TDriveSystemVCL }
23
24procedure TDriverSystemVCL.DoAfterDriverInit(Sender: TObject);
25begin
26 Application.Run;
27end;
28
29procedure TDriverSystemVCL.Finalize;
30begin
31 inherited;
32end;
33
34procedure TDriverSystemVCL.Initialize;
35begin
36 inherited;
37 Application.Initialize;
38 Application.MainFormOnTaskbar := True;
39 Kernel.OnTick := DoTick;
40end;
41
42procedure TDriverSystemVCL.DoTick(Sender: TObject);
43begin
44 try
45 Application.HandleMessage;
46 except
47 Application.HandleException(Self);
48 end;
49 if Application.Terminated then Kernel.Terminated := True;
50end;
51
52end.
Note: See TracBrowser for help on using the repository browser.