Product : Engine, Version : 5.1.1.1037, ArticleID : 41023999

HowTo : Screen (TScreen) variable in Delphi.

Article41023999
TypeHowTo
ProductEngine
Version5.1.1.1037
Date Added6/3/2005
Submitted byFriedhelm Grossekathofer
Keywords

Subject

Screen (TScreen) variable in Delphi.

Summary

Within Delphi a variable Screen is automaticly created at runtime. This variable represents the monitor. You can find out what form is active... The variable is of type TSreen.

But when using VDPro screen becomes a constant and is of type integer. When I look up for the declaration of screen I see screen is redefined in VDProLib5_TLB in rhe section vdConstPrintMode.

Solution

When you are using the VectorDraw component in your project instead of calling Delphi's screen like :
begin
    a:=Screen.Width /2;
    form1.Caption:=FloatToStr(a);
end
use it like :
begin
    a:=Forms.Screen.Width /2;
    form1.Caption:=FloatToStr(a);
end