GetWindowRgn Reference in C#, VB.NET and VB6
Visual Basic 6 definition
Visual Basic 6 example source code
Declare Function GetWindowRgn Lib "user32.dll" (ByVal hWnd As Long, ByVal hRgn As Long) As Long
Visual Basic .NET definition
Declare Function GetWindowRgn Lib "user32" (ByVal hwnd As Integer, ByVal hRgn As Integer) As Integer
public static extern int GetWindowRgn(int hwnd, int hRgn)
GetWindowRgn obtains a copy of a window's current region. If a non-empty region is applied to a window, it resticts the area of the window that is visible, effectively changing its shape as far as the user is concerned. This function copies a window's region into a second region passed to the function.
Gets a copy of the window region of a window.
The function returns one of the following flags specifying the result of the region combination operation:
An error occured while trying to combine the regions.
The combined region is empty, i.e., null.
The combined region forms a rectangle.
The combined region is not empty but is also not a rectangle.
For further information on Windows API functions such as these, and how to use these API's in your
C# and VB.NET applications, please refer to the book 'Network programming in .NET' (Buy at Amazon UK)
(Buy at Amazon US)
Visual Basic .NET example source code
Provide a code example
Copyright 2017 Infinite Loop Ltd.