With the ToRectangle method, we can return one System.Drawing.Rectangle structure instance for this rectangle.
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int left;
public int top;
public int right;
public int bottom;
public RECT(int left, int top, int right, int bottom)
{
this.left = left;
this.top = top;
this.right = right;
this.bottom = bottom;
}
public Rectangle ToRectangle
{
get
{
return new Rectangle(this.left, this.top, this.right-this.left, this.bottom-this.top);
}
}
}
<StructLayout(LayoutKind.Sequential)> _
Public Structure RECT()
Left As Integer
Right As Integer
Top As Integer
Bottom As Integer
End Structure
Public Function ToRectangle() As Rectangle
Return New Rectangle(RECT.Left, RECT.Top, RECT.Right-RECT.Left, RECT.Bottom-RECT.Top)
End Function
None.
None.
Please add some!
Please add some!
TODO