Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "WINDOWPLACEMENT" in [All]

user32

.
Summary
.

/// A pointer to the WINDOWPLACEMENT structure that receives the show state and position information.

.

/// Before calling GetWindowPlacement, set the length member to sizeof(WINDOWPLACEMENT). GetWindowPlacement fails if lpwndpl-> length is not set correctly.

.

internal static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);

.

Private Shared Function GetWindowPlacement(ByVal hWnd As IntPtr, ByRef lpwndpl As WINDOWPLACEMENT) As Boolean

.

Public Declare Function GetWindowPlacement Lib "user32" _

.

           ByRef lpwndpl As WINDOWPLACEMENT) As Long

.

WINDOWPLACEMENT

.

    static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);

.

    private struct WINDOWPLACEMENT

.

       WINDOWPLACEMENT placement = new WINDOWPLACEMENT();

.

       GetWindowPlacement(this.Handle, ref placement);

.

    Private Declare Function GetWindowPlacement Lib "user32" (ByVal hwnd As IntPtr, ByRef lpwndpl As WINDOWPLACEMENT) As Integer

.

    Private Structure WINDOWPLACEMENT

.

        Dim wpTemp As WINDOWPLACEMENT

.

        intRet = GetWindowPlacement(Me.Handle.ToInt32, wpTemp)

.
Documentation
[GetWindowPlacement] on MSDN
.
Summary
GetWindowPos is an old Win32 method, you should use GetWindowRect or GetWindowPlacement
.

Use GetWindowPlacement Win32 method for a more detailed set of info such as Z-Order.

.
Summary
.

/// A pointer to a WINDOWPLACEMENT structure that specifies the new show state and window positions.

.

/// Before calling SetWindowPlacement, set the length member of the WINDOWPLACEMENT structure to sizeof(WINDOWPLACEMENT). SetWindowPlacement fails if the length member is not set correctly.

.

static extern bool SetWindowPlacement(IntPtr hWnd,

.

   [In] ref WINDOWPLACEMENT lpwndpl);

.

Public Shared Function SetWindowPlacement( _

.

     ByRef lpwndpl As WINDOWPLACEMENT) As Boolean

.

Public Declare Function SetWindowPlacement Lib "user32" _

.

          ByRef lpwndpl As WINDOWPLACEMENT) As Long

.

WINDOWPLACEMENT.

.

static extern bool SetWindowPlacement(IntPtr hWnd,

.

[In] ref WINDOWPLACEMENT lpwndpl);

.

  private struct WINDOWPLACEMENT

.

WINDOWPLACEMENT param = new WINDOWPLACEMENT();

.

param.length = Marshal.SizeOf(typeof(WINDOWPLACEMENT));

.

SetWindowPlacement(this.Handle, ref param);

.
Documentation
[SetWindowPlacement] on MSDN

Enums

.
Summary

Structures

.
Summary
The WINDOWPLACEMENT structure contains information about the placement of a window on the screen.
.

internal struct WINDOWPLACEMENT

.

     /// The length of the structure, in bytes. Before calling the GetWindowPlacement or SetWindowPlacement functions, set this member to sizeof(WINDOWPLACEMENT).

.

     /// GetWindowPlacement and SetWindowPlacement fail if this member is not set correctly.

.

     public static WINDOWPLACEMENT Default

.

             WINDOWPLACEMENT result = new WINDOWPLACEMENT();

.

Private Structure WINDOWPLACEMENT

.

Public Type WINDOWPLACEMENT

.

Use with GetWindowPlacement and SetWindowPlacement

.
Documentation
[WINDOWPLACEMENT] on MSDN

 
Access PInvoke.net directly from VS: