home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 February / DPPCPRO0299.ISO / February / Delphi / Install / DATA.Z / GRAPHSVR.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-06-11  |  16.7 KB  |  568 lines

  1. unit GraphSvr;
  2.  
  3. { Conversion log:
  4.   Array property TGraphicsServer.Label renamed to Label_: Identifier is a reserved word }
  5.  
  6. interface
  7.  
  8. uses Ole2, OleCtl, Classes, Graphics, OleCtrls;
  9.  
  10. const
  11.  
  12. { AutoIncConstants }
  13.  
  14.   gphOff = 0;
  15.   gphOn = 1;
  16.  
  17. { BackgroundConstants }
  18.  
  19.   gphBlack = 0;
  20.   gphBlue = 1;
  21.   gphGreen = 2;
  22.   gphCyan = 3;
  23.   gphRed = 4;
  24.   gphMagenta = 5;
  25.   gphBrown = 6;
  26.   gphLightGray = 7;
  27.   gphDarkGray = 8;
  28.   gphLightBlue = 9;
  29.   gphLightGreen = 10;
  30.   gphLightCyan = 11;
  31.   gphLightRed = 12;
  32.   gphLightMagenta = 13;
  33.   gphYellow = 14;
  34.   gphWhite = 15;
  35.  
  36. { ColorDataConstants }
  37.  
  38. //gphBlack = 0;
  39. //gphBlue = 1;
  40. //gphGreen = 2;
  41. //gphCyan = 3;
  42. //gphRed = 4;
  43. //gphMagenta = 5;
  44. //gphBrown = 6;
  45. //gphLightGray = 7;
  46. //gphDarkGray = 8;
  47. //gphLightBlue = 9;
  48. //gphLightGreen = 10;
  49. //gphLightCyan = 11;
  50. //gphLightRed = 12;
  51. //gphLightMagenta = 13;
  52. //gphYellow = 14;
  53. //gphWhite = 15;
  54.  
  55. { DataResetConstants }
  56.  
  57.   gphNone = 0;
  58.   gphGraphData = 1;
  59.   gphColorData = 2;
  60.   gphExtraData = 3;
  61.   gphLabelText = 4;
  62.   gphLegendText = 5;
  63.   gphPatternData = 6;
  64.   gphSymbolData = 7;
  65.   gphXPosData = 8;
  66.   gphAllData = 9;
  67.   gphFontInfo = 10;
  68.  
  69. { DrawModeConstants }
  70.  
  71.   gphNoAction = 0;
  72.   gphClear = 1;
  73.   gphDraw = 2;
  74.   gphBlit = 3;
  75.   gphCopy = 4;
  76.   gphPrint = 5;
  77.   gphWrite = 6;
  78.  
  79. { DrawStyleConstants }
  80.  
  81.   gphMonochrome = 0;
  82.   gphColor = 1;
  83.  
  84. { FontFamilyConstants }
  85.  
  86.   gphRoman = 0;
  87.   gphSwiss = 1;
  88.   gphModern = 2;
  89.  
  90. { FontStyleConstants }
  91.  
  92.   gphDefault = 0;
  93.   gphItalic = 1;
  94.   gphBold = 2;
  95.   gphBoldItalic = 3;
  96.   gphUnderlined = 4;
  97.   gphUnderlinedItalic = 5;
  98.   gphUnderlinedBold = 6;
  99.   gphUnderlinedBoldItalic = 7;
  100.  
  101. { FontUseConstants }
  102.  
  103.   gphGraphTitle = 0;
  104.   gphOtherTitles = 1;
  105.   gphLabels = 2;
  106.   gphLegend = 3;
  107.   gphAllText = 4;
  108.  
  109. { ForegroundConstants }
  110.  
  111. //gphBlack = 0;
  112. //gphBlue = 1;
  113. //gphGreen = 2;
  114. //gphCyan = 3;
  115. //gphRed = 4;
  116. //gphMagenta = 5;
  117. //gphBrown = 6;
  118. //gphLightGray = 7;
  119. //gphDarkGray = 8;
  120. //gphLightBlue = 9;
  121. //gphLightGreen = 10;
  122. //gphLightCyan = 11;
  123. //gphLightRed = 12;
  124. //gphLightMagenta = 13;
  125. //gphYellow = 14;
  126. //gphWhite = 15;
  127.   gphAutoBlackWhite = 16;
  128.  
  129. { GraphTypeConstants }
  130.  
  131. //gphNone = 0;
  132.   gphPie2D = 1;
  133.   gphPie3D = 2;
  134.   gphBar2D = 3;
  135.   gphBar3D = 4;
  136.   gphGantt = 5;
  137.   gphLine = 6;
  138.   gphLogLin = 7;
  139.   gphArea = 8;
  140.   gphScatter = 9;
  141.   gphPolar = 10;
  142.   gphHLC = 11;
  143.  
  144. { GridStyleConstants }
  145.  
  146. //gphNone = 0;
  147.   gphHorizontal = 1;
  148.   gphVertical = 2;
  149.   gphBoth = 3;
  150.  
  151. { IndexStyleConstants }
  152.  
  153.   gphStandard = 0;
  154.   gphEnhanced = 1;
  155.  
  156. { LabelsConstants }
  157.  
  158. //gphOff = 0;
  159. //gphOn = 1;
  160.   gphXAxisLabelsOnly = 2;
  161.   gphYAxisLabelsOnly = 3;
  162.  
  163. { LegendStyleConstants }
  164.  
  165. //gphMonochrome = 0;
  166. //gphColor = 1;
  167.  
  168. { LineStatsConstants }
  169.  
  170. //gphNone = 0;
  171.   gphMean = 1;
  172.   gphMinmax = 2;
  173.   gphMeanMinmax = 3;
  174.   gphStddev = 4;
  175.   gphStddevMean = 5;
  176.   gphStddevMinmax = 6;
  177.   gphStddevMinmaxMean = 7;
  178.   gphBestfit = 8;
  179.   gphBestfitMean = 9;
  180.   gphBestfitMinmax = 10;
  181.   gphBestfitMinmaxMean = 11;
  182.   gphBestfitStddev = 12;
  183.   gphBestfitStddevMean = 13;
  184.   gphBestfitStddevMinmax = 14;
  185.   gphAll = 15;
  186.  
  187. { PaletteConstants }
  188.  
  189. //gphDefault = 0;
  190.   gphPastel = 1;
  191.   gphGrayscale = 2;
  192.  
  193. { PatternedLinesConstants }
  194.  
  195.   gphPatternOff = 0;
  196.   gphPatternOn = 1;
  197.  
  198. { PrintStyleConstants }
  199.  
  200. //gphMonochrome = 0;
  201. //gphColor = 1;
  202.   gphMonochromeWithBorder = 2;
  203.   gphColorWithBorder = 3;
  204.  
  205. { RandomDataConstants }
  206.  
  207. //gphOff = 0;
  208. //gphOn = 1;
  209.  
  210. { SymbolDataConstants }
  211.  
  212.   gphCrossPlus = 0;
  213.   gphCrossTimes = 1;
  214.   gphTriangleUp = 2;
  215.   gphSolidTriangleUp = 3;
  216.   gphTriangleDown = 4;
  217.   gphSolidTriangleDown = 5;
  218.   gphSquare = 6;
  219.   gphSolidSquare = 7;
  220.   gphDiamond = 8;
  221.   gphSolidDiamond = 9;
  222.  
  223. { ThickLinesConstants }
  224.  
  225.   gphLinesOff = 0;
  226.   gphLinesOn = 1;
  227.  
  228. { TicksConstants }
  229.  
  230.   gphTicksOff = 0;
  231.   gphTicksOn = 1;
  232.   gphXAxisTicksOnly = 2;
  233.   gphYAxisTicksOnly = 3;
  234.  
  235. { YAxisPosConstants }
  236.  
  237. //gphDefault = 0;
  238.   gphAlignLeft = 1;
  239.   gphAlignRight = 2;
  240.  
  241. { YAxisStyleConstants }
  242.  
  243. //gphDefault = 0;
  244.   gphVariableOrigin = 1;
  245.   gphUserDefined = 2;
  246.  
  247. { BorderStyleConstants }
  248.  
  249. //gphNone = 0;
  250.   gphFixedSingle = 1;
  251.  
  252. type
  253.  
  254.   TGraphicsServer = class(TOleControl)
  255.   private
  256.     function Get_Color(index: Smallint): Smallint; stdcall;
  257.     procedure Set_Color(index: Smallint; Value: Smallint); stdcall;
  258.     function Get_Data(index: Smallint): Single; stdcall;
  259.     procedure Set_Data(index: Smallint; Value: Single); stdcall;
  260.     function Get_Extra(index: Smallint): Smallint; stdcall;
  261.     procedure Set_Extra(index: Smallint; Value: Smallint); stdcall;
  262.     function Get_FFamily(index: Smallint): Smallint; stdcall;
  263.     procedure Set_FFamily(index: Smallint; Value: Smallint); stdcall;
  264.     function Get_FSize(index: Smallint): Smallint; stdcall;
  265.     procedure Set_FSize(index: Smallint; Value: Smallint); stdcall;
  266.     function Get_FStyle(index: Smallint): Smallint; stdcall;
  267.     procedure Set_FStyle(index: Smallint; Value: Smallint); stdcall;
  268.     function Get_Label_(index: Smallint): string; stdcall;
  269.     procedure Set_Label_(index: Smallint; const Value: string); stdcall;
  270.     function Get_Legend(index: Smallint): string; stdcall;
  271.     procedure Set_Legend(index: Smallint; const Value: string); stdcall;
  272.     function Get_Pattern(index: Smallint): Smallint; stdcall;
  273.     procedure Set_Pattern(index: Smallint; Value: Smallint); stdcall;
  274.     function Get_Symbol(index: Smallint): Smallint; stdcall;
  275.     procedure Set_Symbol(index: Smallint; Value: Smallint); stdcall;
  276.     function Get_XPos(index: Smallint): Single; stdcall;
  277.     procedure Set_XPos(index: Smallint; Value: Single); stdcall;
  278.   protected
  279.     procedure InitControlData; override;
  280.   public
  281.     procedure Refresh; stdcall;
  282.     procedure AboutBox; stdcall;
  283.     property Picture: Variant index 35 read GetVariantProp write SetVariantProp;
  284.     property QuickData: string index 37 read GetStringProp write SetStringProp;
  285.     property SeeThru: Smallint index 39 read GetSmallintProp write SetSmallintProp;
  286.     property Color[index: Smallint]: Smallint read Get_Color write Set_Color;
  287.     property Data[index: Smallint]: Single read Get_Data write Set_Data;
  288.     property Extra[index: Smallint]: Smallint read Get_Extra write Set_Extra;
  289.     property FFamily[index: Smallint]: Smallint read Get_FFamily write Set_FFamily;
  290.     property FSize[index: Smallint]: Smallint read Get_FSize write Set_FSize;
  291.     property FStyle[index: Smallint]: Smallint read Get_FStyle write Set_FStyle;
  292.     property Label_[index: Smallint]: string read Get_Label_ write Set_Label_;
  293.     property Legend[index: Smallint]: string read Get_Legend write Set_Legend;
  294.     property Pattern[index: Smallint]: Smallint read Get_Pattern write Set_Pattern;
  295.     property Symbol[index: Smallint]: Smallint read Get_Symbol write Set_Symbol;
  296.     property XPos[index: Smallint]: Single read Get_XPos write Set_XPos;
  297.   published
  298.     property TabStop;
  299.     property DragCursor;
  300.     property DragMode;
  301.     property ParentShowHint;
  302.     property PopupMenu;
  303.     property ShowHint;
  304.     property TabOrder;
  305.     property Visible;
  306.     property OnDragDrop;
  307.     property OnDragOver;
  308.     property OnEndDrag;
  309.     property OnEnter;
  310.     property OnExit;
  311.     property OnStartDrag;
  312.     property OnClick;
  313.     property OnDblClick;
  314.     property OnKeyDown;
  315.     property OnKeyPress;
  316.     property OnKeyUp;
  317.     property OnMouseDown;
  318.     property OnMouseMove;
  319.     property OnMouseUp;
  320.     property AutoInc: TOleEnum index 1 read GetOleEnumProp write SetOleEnumProp stored False;
  321.     property Background: TOleEnum index 2 read GetOleEnumProp write SetOleEnumProp stored False;
  322.     property BottomTitle: string index 3 read GetStringProp write SetStringProp stored False;
  323.     property ColorData: TOleEnum index 4 read GetOleEnumProp write SetOleEnumProp stored False;
  324.     property CtlVersion: string index 5 read GetStringProp write SetStringProp stored False;
  325.     property DataReset: TOleEnum index 6 read GetOleEnumProp write SetOleEnumProp stored False;
  326.     property DrawMode: TOleEnum index 7 read GetOleEnumProp write SetOleEnumProp stored False;
  327.     property DrawStyle: TOleEnum index 8 read GetOleEnumProp write SetOleEnumProp stored False;
  328.     property ExtraData: Smallint index 9 read GetSmallintProp write SetSmallintProp stored False;
  329.     property FontFamily: TOleEnum index 10 read GetOleEnumProp write SetOleEnumProp stored False;
  330.     property FontSize: Smallint index 11 read GetSmallintProp write SetSmallintProp stored False;
  331.     property FontStyle: TOleEnum index 12 read GetOleEnumProp write SetOleEnumProp stored False;
  332.     property FontUse: TOleEnum index 13 read GetOleEnumProp write SetOleEnumProp stored False;
  333.     property Foreground: TOleEnum index 14 read GetOleEnumProp write SetOleEnumProp stored False;
  334.     property GraphCaption: string index 15 read GetStringProp write SetStringProp stored False;
  335.     property GraphData: Single index 16 read GetSingleProp write SetSingleProp stored False;
  336.     property GraphStyle: Smallint index 17 read GetSmallintProp write SetSmallintProp stored False;
  337.     property GraphTitle: string index 18 read GetStringProp write SetStringProp stored False;
  338.     property GraphType: TOleEnum index 19 read GetOleEnumProp write SetOleEnumProp stored False;
  339.     property GridStyle: TOleEnum index 20 read GetOleEnumProp write SetOleEnumProp stored False;
  340.     property ImageFile: string index 21 read GetStringProp write SetStringProp stored False;
  341.     property IndexStyle: TOleEnum index 22 read GetOleEnumProp write SetOleEnumProp stored False;
  342.     property LabelEvery: Smallint index 23 read GetSmallintProp write SetSmallintProp stored False;
  343.     property Labels: TOleEnum index 24 read GetOleEnumProp write SetOleEnumProp stored False;
  344.     property LabelText: string index 25 read GetStringProp write SetStringProp stored False;
  345.     property LeftTitle: string index 26 read GetStringProp write SetStringProp stored False;
  346.     property LegendStyle: TOleEnum index 27 read GetOleEnumProp write SetOleEnumProp stored False;
  347.     property LegendText: string index 28 read GetStringProp write SetStringProp stored False;
  348.     property LineStats: TOleEnum index 29 read GetOleEnumProp write SetOleEnumProp stored False;
  349.     property NumPoints: Smallint index 30 read GetSmallintProp write SetSmallintProp stored False;
  350.     property NumSets: Smallint index 31 read GetSmallintProp write SetSmallintProp stored False;
  351.     property Palette: TOleEnum index 32 read GetOleEnumProp write SetOleEnumProp stored False;
  352.     property PatternData: Smallint index 33 read GetSmallintProp write SetSmallintProp stored False;
  353.     property PatternedLines: TOleEnum index 34 read GetOleEnumProp write SetOleEnumProp stored False;
  354.     property PrintStyle: TOleEnum index 36 read GetOleEnumProp write SetOleEnumProp stored False;
  355.     property RandomData: TOleEnum index 38 read GetOleEnumProp write SetOleEnumProp stored False;
  356.     property SymbolData: TOleEnum index 40 read GetOleEnumProp write SetOleEnumProp stored False;
  357.     property ThickLines: TOleEnum index 41 read GetOleEnumProp write SetOleEnumProp stored False;
  358.     property ThisPoint: Smallint index 42 read GetSmallintProp write SetSmallintProp stored False;
  359.     property ThisSet: Smallint index 43 read GetSmallintProp write SetSmallintProp stored False;
  360.     property TickEvery: Smallint index 44 read GetSmallintProp write SetSmallintProp stored False;
  361.     property Ticks: TOleEnum index 45 read GetOleEnumProp write SetOleEnumProp stored False;
  362.     property XPosData: Single index 46 read GetSingleProp write SetSingleProp stored False;
  363.     property YAxisMax: Single index 47 read GetSingleProp write SetSingleProp stored False;
  364.     property YAxisMin: Single index 48 read GetSingleProp write SetSingleProp stored False;
  365.     property YAxisPos: TOleEnum index 49 read GetOleEnumProp write SetOleEnumProp stored False;
  366.     property YAxisStyle: TOleEnum index 50 read GetOleEnumProp write SetOleEnumProp stored False;
  367.     property YAxisTicks: Smallint index 51 read GetSmallintProp write SetSmallintProp stored False;
  368.     property Enabled: TOleBool index -514 read GetOleBoolProp write SetOleBoolProp stored False;
  369.     property BorderStyle: TOleEnum index -504 read GetOleEnumProp write SetOleEnumProp stored False;
  370.     property hWnd: Integer index -515 read GetIntegerProp write SetIntegerProp stored False;
  371.   end;
  372.  
  373. procedure Register;
  374.  
  375. implementation
  376.  
  377. {$J+}
  378.  
  379. procedure TGraphicsServer.InitControlData;
  380. const
  381.   CControlData: TControlData = (
  382.     ClassID: (
  383.       D1:$0842D100;D2:$1E19;D3:$101B;D4:($9A,$AF,$1A,$16,$26,$55,$1E,$7C));
  384.     EventIID: (
  385.       D1:$0842D102;D2:$1E19;D3:$101B;D4:($9A,$AF,$1A,$16,$26,$55,$1E,$7C));
  386.     EventCount: 0;
  387.     EventDispIDs: nil;
  388.     LicenseKey: nil;
  389.     Flags: $00000008);
  390. begin
  391.   ControlData := @CControlData;
  392. end;
  393.  
  394. procedure TGraphicsServer.Refresh;
  395. const
  396.   DispInfo: array[0..7] of Byte = ($DA,$FD,$FF,$FF,$00,$01,$00,$00);
  397. begin
  398.   InvokeMethod(DispInfo, nil);
  399. end;
  400.  
  401. procedure TGraphicsServer.AboutBox;
  402. const
  403.   DispInfo: array[0..7] of Byte = ($D8,$FD,$FF,$FF,$00,$01,$00,$00);
  404. begin
  405.   InvokeMethod(DispInfo, nil);
  406. end;
  407.  
  408. function TGraphicsServer.Get_Color;
  409. const
  410.   DispInfo: array[0..8] of Byte = ($34,$00,$00,$00,$02,$02,$01,$00,$02);
  411. begin
  412.   InvokeMethod(DispInfo, @Result);
  413. end;
  414.  
  415. procedure TGraphicsServer.Set_Color;
  416. const
  417.   DispInfo: array[0..9] of Byte = ($34,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  418. begin
  419.   InvokeMethod(DispInfo, nil);
  420. end;
  421.  
  422. function TGraphicsServer.Get_Data;
  423. const
  424.   DispInfo: array[0..8] of Byte = ($35,$00,$00,$00,$04,$02,$01,$00,$02);
  425. begin
  426.   InvokeMethod(DispInfo, @Result);
  427. end;
  428.  
  429. procedure TGraphicsServer.Set_Data;
  430. const
  431.   DispInfo: array[0..9] of Byte = ($35,$00,$00,$00,$00,$04,$02,$00,$02,$04);
  432. begin
  433.   InvokeMethod(DispInfo, nil);
  434. end;
  435.  
  436. function TGraphicsServer.Get_Extra;
  437. const
  438.   DispInfo: array[0..8] of Byte = ($36,$00,$00,$00,$02,$02,$01,$00,$02);
  439. begin
  440.   InvokeMethod(DispInfo, @Result);
  441. end;
  442.  
  443. procedure TGraphicsServer.Set_Extra;
  444. const
  445.   DispInfo: array[0..9] of Byte = ($36,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  446. begin
  447.   InvokeMethod(DispInfo, nil);
  448. end;
  449.  
  450. function TGraphicsServer.Get_FFamily;
  451. const
  452.   DispInfo: array[0..8] of Byte = ($37,$00,$00,$00,$02,$02,$01,$00,$02);
  453. begin
  454.   InvokeMethod(DispInfo, @Result);
  455. end;
  456.  
  457. procedure TGraphicsServer.Set_FFamily;
  458. const
  459.   DispInfo: array[0..9] of Byte = ($37,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  460. begin
  461.   InvokeMethod(DispInfo, nil);
  462. end;
  463.  
  464. function TGraphicsServer.Get_FSize;
  465. const
  466.   DispInfo: array[0..8] of Byte = ($38,$00,$00,$00,$02,$02,$01,$00,$02);
  467. begin
  468.   InvokeMethod(DispInfo, @Result);
  469. end;
  470.  
  471. procedure TGraphicsServer.Set_FSize;
  472. const
  473.   DispInfo: array[0..9] of Byte = ($38,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  474. begin
  475.   InvokeMethod(DispInfo, nil);
  476. end;
  477.  
  478. function TGraphicsServer.Get_FStyle;
  479. const
  480.   DispInfo: array[0..8] of Byte = ($39,$00,$00,$00,$02,$02,$01,$00,$02);
  481. begin
  482.   InvokeMethod(DispInfo, @Result);
  483. end;
  484.  
  485. procedure TGraphicsServer.Set_FStyle;
  486. const
  487.   DispInfo: array[0..9] of Byte = ($39,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  488. begin
  489.   InvokeMethod(DispInfo, nil);
  490. end;
  491.  
  492. function TGraphicsServer.Get_Label_;
  493. const
  494.   DispInfo: array[0..8] of Byte = ($3A,$00,$00,$00,$08,$02,$01,$00,$02);
  495. begin
  496.   InvokeMethod(DispInfo, @Result);
  497. end;
  498.  
  499. procedure TGraphicsServer.Set_Label_;
  500. const
  501.   DispInfo: array[0..9] of Byte = ($3A,$00,$00,$00,$00,$04,$02,$00,$02,$08);
  502. begin
  503.   InvokeMethod(DispInfo, nil);
  504. end;
  505.  
  506. function TGraphicsServer.Get_Legend;
  507. const
  508.   DispInfo: array[0..8] of Byte = ($3B,$00,$00,$00,$08,$02,$01,$00,$02);
  509. begin
  510.   InvokeMethod(DispInfo, @Result);
  511. end;
  512.  
  513. procedure TGraphicsServer.Set_Legend;
  514. const
  515.   DispInfo: array[0..9] of Byte = ($3B,$00,$00,$00,$00,$04,$02,$00,$02,$08);
  516. begin
  517.   InvokeMethod(DispInfo, nil);
  518. end;
  519.  
  520. function TGraphicsServer.Get_Pattern;
  521. const
  522.   DispInfo: array[0..8] of Byte = ($3C,$00,$00,$00,$02,$02,$01,$00,$02);
  523. begin
  524.   InvokeMethod(DispInfo, @Result);
  525. end;
  526.  
  527. procedure TGraphicsServer.Set_Pattern;
  528. const
  529.   DispInfo: array[0..9] of Byte = ($3C,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  530. begin
  531.   InvokeMethod(DispInfo, nil);
  532. end;
  533.  
  534. function TGraphicsServer.Get_Symbol;
  535. const
  536.   DispInfo: array[0..8] of Byte = ($3D,$00,$00,$00,$02,$02,$01,$00,$02);
  537. begin
  538.   InvokeMethod(DispInfo, @Result);
  539. end;
  540.  
  541. procedure TGraphicsServer.Set_Symbol;
  542. const
  543.   DispInfo: array[0..9] of Byte = ($3D,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  544. begin
  545.   InvokeMethod(DispInfo, nil);
  546. end;
  547.  
  548. function TGraphicsServer.Get_XPos;
  549. const
  550.   DispInfo: array[0..8] of Byte = ($3E,$00,$00,$00,$04,$02,$01,$00,$02);
  551. begin
  552.   InvokeMethod(DispInfo, @Result);
  553. end;
  554.  
  555. procedure TGraphicsServer.Set_XPos;
  556. const
  557.   DispInfo: array[0..9] of Byte = ($3E,$00,$00,$00,$00,$04,$02,$00,$02,$04);
  558. begin
  559.   InvokeMethod(DispInfo, nil);
  560. end;
  561.  
  562. procedure Register;
  563. begin
  564.   RegisterComponents('OCX', [TGraphicsServer]);
  565. end;
  566.  
  567. end.
  568.