Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
function PtInRect(const ARect: TRect; const APoint: TPoint): Boolean;
Returns true if a specified point lies inside a specified rectangle.
APoint IS inside a rectangle if it lies on the left or top edge, but NOT if it lies on the right or bottom edge of ARect. If ARect has negative width or height the function returns False.
var CurPos: TPoint;
ARect :TRect;
GetCursorPos(CurPos);
ARect := Rect(Screen.DesktopLeft,
Screen.DesktopRight,
Screen.DesktopWidth div 2,
Screen.DesktopHeight div 2)
// find if the sursor is
//below the center of the screen desktop area
if PtInRect(ARect, CurPos) then
ShowMessage('Move up your cursor ;)');
|
Zoom
How to write a Delphi application that is able to zoom in portion of your desktop screen.
TScreen demystified
Coding the TScreen object, obtainer of all information about the current state of the screen in a Delphi application.
Rect
| Free Delphi code snippet inside every Delphi Newsletter! |
|
|
| Got some code to share? Got a question? Need some help? |
|
|