GetWindowPlacement
C# Signature:
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);VB.NET Signature:
<DllImport("user32.dll")> _
Private Shared Function GetWindowPlacement(ByVal hWnd As IntPtr, ByRef lpwndpl As WINDOWPLACEMENT) As Boolean
End FunctionVB Signature:
Public Declare Function GetWindowPlacement Lib "user32" _
(ByVal hWnd As Long, _
ByRef lpwndpl As WINDOWPLACEMENT) As LongC# Sample Code:
private void GetPlacement()
{
WINDOWPLACEMENT placement = new WINDOWPLACEMENT();
placement.length = Marshal.SizeOf(placement);
GetWindowPlacement(this.Handle, ref placement);
}VB Sample Code:
Última actualización