Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than Structures, prefix the name with the module name and a period.
rect (Structures)
.
C# Signature:
[StructLayout(LayoutKind.Sequential)]
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;
}
// Handy method for converting to a System.Drawing.Rectangle
public Rectangle Rectangle
{
get { return new Rectangle(this.left, this.top, this.right - this.left, this.bottom - this.top); }
}
}
VB Definition:
<System.Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)> _
Public Structure Rect
Public Left As Integer
Public Top As Integer
Public Right As Integer
Public Bottom As Integer
Public Overrides Function ToString() As String
ToString = String.Format("({0},{1})-({2},{3})", Left, Top, Right, Bottom)
End Function
'Conversion to rectangle
Public ReadOnly Property Rectangle() As Rectangle
Get
Return New Rectangle(Left, Top, Right - Left, Bottom - Top)
End Get
End Property
End Structure
Notes:
This can be used when a PInvoke signature requires a "Win32 rectangle," otherwise you should be using System.Drawing.Rectangle.
The mechanism provided by the CLR that enables managed code to call static DLL exports.k
10/27/2022 9:24:28 PM - 114.37.143.20
Please edit this page!
Do you have...
helpful tips?
corrections to the existing content?
alternate definitions?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.