Board index » delphi » Win 1.5 Pascal - CRT Unit - Window positioning

Win 1.5 Pascal - CRT Unit - Window positioning

Does anyone know how to modify the CRT unit so I can place my screen/window in
the middle of my display.  Currently, the screen/window is positioned in the
upper left corner.

In the help section it stated th change the following X & Y coordinates.  I
changed them but did not work.

const
    WindowOrg: TPoint =                       { CRT window origin }
    (X: 10; Y: 15);

Does anyone know if Win !.5 pascal will function under windows 98?
thanks

 

Re:Win 1.5 Pascal - CRT Unit - Window positioning


The following program compiled in TPW 1.5 on Windows 98 puts a CRT box in the
centre of my screen.

program Centre;
uses
  WinCrt;
begin
  WindowOrg.X :=0200;
  WindowOrg.Y :=0100;
  Writeln('Centre test');
end.

The WindowOrg variables must be changed before the first IO. TPW 1.5 seems to work
perfectly well in Windows98.

Ciaran

Quote
Dmhusa wrote:
> Does anyone know how to modify the CRT unit so I can place my screen/window in
> the middle of my display.  Currently, the screen/window is positioned in the
> upper left corner.

> In the help section it stated th change the following X & Y coordinates.  I
> changed them but did not work.

> const
>     WindowOrg: TPoint =                       { CRT window origin }
>     (X: 10; Y: 15);

> Does anyone know if Win !.5 pascal will function under windows 98?
> thanks

Other Threads