2007-02-22 13:09:12 +00:00
|
|
|
unit ViewCode;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
2007-04-04 18:09:47 +00:00
|
|
|
delphicompat, LCLIntf, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
Dialogs, StdCtrls, LResources, SynHighlighterPas, SynEdit;
|
2007-02-22 13:09:12 +00:00
|
|
|
|
|
|
|
type
|
2007-04-04 18:09:47 +00:00
|
|
|
|
|
|
|
{ TfrmViewCode }
|
|
|
|
|
|
|
|
TfrmViewCode =
|
2007-02-22 13:09:12 +00:00
|
|
|
class(TForm)
|
2007-04-04 18:09:47 +00:00
|
|
|
SynEdit1: TSynEdit;
|
|
|
|
SynPasSyn1: TSynPasSyn;
|
2007-02-22 13:09:12 +00:00
|
|
|
procedure FormActivate(Sender: TObject);
|
|
|
|
|
|
|
|
private
|
|
|
|
{ Private declarations }
|
|
|
|
public
|
|
|
|
{ Public declarations }
|
|
|
|
end;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
procedure TfrmViewCode.FormActivate(Sender: TObject);
|
|
|
|
var
|
|
|
|
r : TRect;
|
|
|
|
begin
|
|
|
|
{get size of desktop}
|
2008-04-10 03:06:03 +00:00
|
|
|
{$ifdef Windows}
|
2007-02-22 13:09:12 +00:00
|
|
|
SystemParametersInfo(SPI_GETWORKAREA, 0, @r, 0);
|
|
|
|
Height := r.Bottom-Top;
|
|
|
|
Width := r.Right-Left;
|
2008-04-10 03:06:03 +00:00
|
|
|
{$endif}
|
2007-02-22 13:09:12 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
initialization
|
|
|
|
{$I ViewCode.lrs}
|
|
|
|
|
|
|
|
end.
|