Log in

View Full Version : Object.Area



Yago
04-07-2011, 01:22 AM
Is there a way to click withing the area box or translate it to the mainscreen such as BoxToMS or AreaToMs?

Every-time I try to click I get and error obviously cause the box 's point are off the mainscreen...

heres a function I find useful:

function BoxOnMS(Box: TBox): Boolean;
var
Mainscreen: TBox;
begin
Result := False;
if Box = Null_Box then
Exit;
MainScreen := IntToBox(MSx1, MSy1, MSx2, MSy2);
if IntInBox(Box.x1 ,Box.y1, MainScreen) and IntInBox(Box.x2, Box.y2, MainScreen) then
Result := True;
end;

It Always returns false and when I try to mousbox the area of and object I get the passing a integer error...