PtInRect Reference in C#, VB.NET and VB6
Visual Basic 6 definition
Visual Basic 6 example source code
Declare Function PtInRect Lib "user32.dll" (lpRect As RECT, ByVal x As Long, ByVal y As Long) As Long
Visual Basic .NET definition
Declare Function PtInRect Lib "user32" (ByRef lpRect As RECT, ByRef pt As POINTAPI) As Integer
public static extern int PtInRect(ref RECT lpRect, ref POINTAPI pt)
Platforms: Win 32s, Win 95/98, Win NT
PtInRect determines if a point lies inside or outside of a rectangle. Note that Windows considers the left and top edges of a rectangle to be inside it, and the right and bottom edges to be outside. The function returns 1 if the point is inside or 0 if it is outside.
Determines whether the specified point lies within the specified rectangle.
For further information on Windows API functions such as these, and how to use these API's in your
C# and VB.NET applications, please refer to the book 'Network programming in .NET' (Buy at Amazon UK)
(Buy at Amazon US)
C# example source code
Provide a code example
Copyright 2017 Infinite Loop Ltd.