A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z



SetWindowRgn

The SetWindowRgn function sets the window region of a window. The window region determines the area within the window where the operating system permits drawing. The operating system does not display any portion of a window that lies outside of the window region.

VB4-32,5,6
Declare Function SetWindowRgn Lib "user32" Alias "SetWindowRgn" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long

VB.NET
System.Windows.Forms.Region

Operating Systems Supported
Requires Windows NT 3.5(1) or later; Requires Windows 95 or later

Library
User32

Parameter Information
- hWnd
Handle to the window whose window region is to be set.

- hRgn
Handle to a region. The function sets the window region of the window to this region.
If hRgn is NULL, the function sets the window region to NULL.

- bRedraw
Boolean value that specifies whether the operating system redraws the window after setting the window region. If bRedraw is TRUE, the operating system does so; otherwise, it does not.
Typically, you set bRedraw to TRUE if the window is visible.

Return Values
If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Last update: 07 April 2006