Desktop Functions: Smart Device Functions:
|
Search Results for "GetWindow" in [All]Interfaces1: IDeskBand
int GetWindow(out IntPtr phwnd);
Public Overridable Sub GetWindow(ByRef phwnd As System.IntPtr) Implements IDeskBand.GetWindow, IDockingWindow.GetWindow, IOleWindow.GetWindow
Sub GetWindow(ByRef phwnd As System.IntPtr)
Sub GetWindow(ByRef phwnd As System.IntPtr)
Sub GetWindow(ByRef phwnd As System.IntPtr) 2: IDeskBand2
int GetWindow(out IntPtr phwnd);
Public Overridable Sub GetWindow(ByRef phwnd As System.IntPtr) Implements IDeskBand.GetWindow, IDockingWindow.GetWindow, IOleWindow.GetWindow
Sub GetWindow(ByRef phwnd As System.IntPtr)
Sub GetWindow(ByRef phwnd As System.IntPtr)
Sub GetWindow(ByRef phwnd As System.IntPtr) 3: IOleWindow
void GetWindow (out IntPtr phwnd) ;
Sub GetWindow(<System.Runtime.InteropServices.Out()> ByRef phwnd As IntPtr)
void GetWindow(out IntPtr phwnd); kernel32
static extern uint GetWindowsDirectory(StringBuilder lpBuffer,
<DllImport("kernel32.dll", SetLastError:=true, EntryPoint:="GetWindowsDirectoryW", CharSet:=CharSet.Unicode)> _
Public Function GetWindowsDirectory(<MarshalAs(UnmanagedType.LPTSTR)>lpBuffer As System.Text.StringBuilder, _
Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" _
Dim Res As Integer = GetWindowsDirectory(WinDir, WinDir.Length)
GetWindowsDirectory(sb,i)
int len = (int)GetWindowsDirectory(sb, MaxPathLength);
GetWindowsDirectory(sb,ref i); advapi326: RegOpenKey
string _getWindowsProductId() 7: RegOpenKeyEx
string _getWindowsProductId() dwmapi
static extern int DwmGetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE dwAttribute, out bool pvAttribute, int cbAttribute);
static extern int DwmGetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE dwAttribute, out RECT pvAttribute, int cbAttribute);
Declare Function DwmGetWindowAttribute Lib "dwmapi.dll" (TODO) As TODO coredll9: GetWindowDC
[DllImport("coredll.dll", EntryPoint="GetWindowDC", SetLastError=true)]
private static extern IntPtr GetWindowDCCE(IntPtr hWnd);
<DllImport("coredll.dll", EntryPoint:="GetWindowDC", CharSet:=CharSet.Auto, ExactSpelling:=True)> _
Private Shared Function GetWindowDC(ByVal hWnd As HandleRef) As IntPtr
Declare Function GetWindowDC Lib "coredll.dll" (ByVal hWnd As HandleRef) As IntPtr 10: GetWindowLong
static extern System.UInt32 GetWindowLong(IntPtr hWnd, int nIndex);
static extern IntPtr GetWindowLong(IntPtr window, int index);
Private Shared Function GetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer) As System.UInt32 11: SetWindowLong
private static extern int GetWindowLong(IntPtr hWnd, int nIndex);
Private Shared Function GetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer) As Integer
style = GetWindowLong(hWnd, GWL_STYLE);
Private Function GetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer) As Integer
style = GetWindowLong(hWnd, GWL_STYLE) psapi
GetWindowThreadProcessId(hWnd, out pid); shell3213: CSIDL
CSIDL_WINDOWS = 0x0024, // GetWindowsDirectory() 14: SHGetFolderPath
CSIDL_WINDOWS = 0x0024, // GetWindowsDirectory()
CSIDL_WINDOWS = 0x0024, // GetWindowsDirectory() Structures16: 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. Use with GetWindowPlacement and SetWindowPlacement setupapi
if (0 == GetWindowsDirectory(winDir, winDir.Capacity)) return (false); uxtheme18: GetWindowTheme
public extern static IntPtr GetWindowTheme(IntPtr hWnd);
Public Declare Function GetWindowTheme Lib "uxtheme.dll" (ByVal hWnd As IntPtr) As IntPtr If a window has a visual style applied, the GetWindowTheme function returns the most recent theme handle from OpenThemeData. If no visual style is applied, GetWindowTheme returns NULL. Enums21: WindowLongFlags
Constants
public class GetWindowConstants {
public class GetWindowConstantsObsolete { 23: GW - GetWindow gdi3225: BitBlt
dc2=GetWindowDC(c.Handle); 26: GetWindowExtEx
27: GetWindowOrgEx
user32
static extern bool GetWindowRect(System.IntPtr hWnd, out RECT lpRect);
GetWindowRect(hWnd, out to);
bool GetWindowRect(int hWnd, RECT^ lpRect);
GetWindowRect(hWnd, to); 29: EnumChildWindows
EnumedWindow callBackPtr = GetWindowHandle;
private static bool GetWindowHandle(IntPtr windowHandle, ArrayList windowHandles)
[DllImport("user32.dll", EntryPoint = "GetWindowText",
public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpWindowText, int nMaxCount);
int nLength = user32.GetWindowText(hWnd, strbTitle, strbTitle.Capacity + 1); 31: GetActiveWindow Can be used to find the active window Hwnd for GetWindowText 32: GetDesktopWindow
Private Declare Auto Function GetWindowDC Lib "user32.dll" (ByVal windowHandle As IntPtr) As IntPtr
Dim srcDeviceContext As IntPtr = GetWindowDC(windowHandle)
//Optional Win32.GetWindowThreadProcessId(GetForegroundWindow(),out ProcessID) 34: GetNextWindow
35: GetWindow
static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);
static extern uint GetWindowThreadProcessId(IntPtr hWnd, IntPtr ProcessId);
Private Shared Function GetWindowThreadProcessId(ByVal hwnd As IntPtr, _
''' <param name="lpdwProcessId">A pointer to a variable that receives the process identifier. If this parameter is not NULL, GetWindowThreadProcessId copies the identifier of the process to the variable; otherwise, it does not. </param>
Private Declare Auto Function GetWindowThreadProcessId Lib "user32.dll" (ByVal hwnd As IntPtr, _
GetWindowThreadProcessId(lngAccessHwnd, lngPid)
Public Declare Auto Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As IntPtr, ByRef lpdwProcessId As IntPtr) As IntPtr
GetWindowThreadProcessId(hOwner, iProcessID)
IntPtr pID = GetWindowThreadProcessId(GetForegroundWindow(), IntPtr.Zero); GetWindowThreadProcessId returns the id of the thread that created the target window. To get the process id of a window, use the first c# signature above, and:
int threadID = GetWindowThreadProcessId(hWnd, out processID); 37: GetWindowDC
static extern IntPtr GetWindowDC(IntPtr hWnd);
Public Shared Function GetWindowDC(ByVal hWnd As IntPtr) As IntPtr
Declare Function GetWindowDC Lib "user32" (ByVal hWnd As Long) As Long GetWindowDC is intended for special painting effects within a window's nonclient area. Painting in nonclient areas of any window is not recommended. The GetSystemMetrics function can be used to retrieve the dimensions of various parts of the nonclient area, such as the title bar, menu, and scroll bars. The GetDC function can be used to retrieve a device context for the entire screen.
Declare Function GetWindowDC Lib "user32" (ByVal hwnd As IntPtr) As IntPtr
Dim MyGrphHdc As IntPtr = GetWindowDC(Me.Handle) 38: GetWindowInfo
private static extern bool GetWindowInfo(IntPtr hwnd, ref WINDOWINFO pwi);
Public Declare Auto Function GetWindowInfo Lib "user32" _
Public Shared Function GetWindowInfo(ByVal hwnd As IntPtr, ByRef pwi As WINDOWINFO) As Boolean You must assign the cbSize parameter prior to calling GetWindowInfo(). For example:
GetWindowInfo(Handle, ref info);
GetWindowInfo(Handle, info) 39: GetWindowLong On this platform this function is in fact a macro that calls GetWindowLong, so the EntryPoint property has to be set to the real function:
[DllImport("user32.dll", EntryPoint="GetWindowLong")]
static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex);
<DllImport("user32.dll", EntryPoint:="GetWindowLong")> _
Private Shared Function GetWindowLongPtr(ByVal hWnd As HandleRef, <MarshalAs(UnmanagedType.I4)>nIndex As WindowLongFlags) As IntPtr
Public Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" _
[DllImport("user32.dll", EntryPoint="GetWindowLongPtr")]
private static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex);
<DllImport("user32.dll", EntryPoint:="GetWindowLongPtr")> _
Private Shared Function GetWindowLongPtr(ByVal hWnd As HandleRef, <MarshalAs(UnmanagedType.I4)>nIndex As WindowLongFlags) As IntPtr
Public Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" _
[DllImport("user32.dll", EntryPoint="GetWindowLong")]
private static extern IntPtr GetWindowLongPtr32(IntPtr hWnd, int nIndex);
[DllImport("user32.dll", EntryPoint="GetWindowLongPtr")]
private static extern IntPtr GetWindowLongPtr64(IntPtr hWnd, int nIndex);
// GetWindowLongPtr directly
public static IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex)
return GetWindowLongPtr64(hWnd, nIndex);
return GetWindowLongPtr32(hWnd, nIndex);
<DllImport("user32.dll", EntryPoint:="GetWindowLong")> _
Private Shared Function GetWindowLongPtr32(ByVal hWnd As HandleRef, ByVal nIndex As Integer) As IntPtr
<DllImport("user32.dll", EntryPoint:="GetWindowLongPtr")> _
Private Shared Function GetWindowLongPtr64(ByVal hWnd As HandleRef, ByVal nIndex As Integer) As IntPtr
' This static method is required because Win32 does not support GetWindowLongPtr dirctly
Public Shared Function GetWindowLongPtr(ByVal hWnd As HandleRef, ByVal nIndex As Integer) As IntPtr
Return GetWindowLongPtr64(hWnd, nIndex)
Return GetWindowLongPtr32(hWnd, nIndex)
result = GetWindowLongPtr(winhandle, GWL.GWL_ID); 40: GetWindowLongPtr On this platform this function is in fact a macro that calls GetWindowLong, so the EntryPoint property has to be set to the real function:
[DllImport("user32.dll", EntryPoint="GetWindowLong")]
static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex);
<DllImport("user32.dll", EntryPoint:="GetWindowLong")> _
Private Shared Function GetWindowLongPtr(ByVal hWnd As HandleRef, <MarshalAs(UnmanagedType.I4)>nIndex As GWL) As IntPtr
Public Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" _
[DllImport("user32.dll", EntryPoint="GetWindowLongPtr")]
private static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex);
<DllImport("user32.dll", EntryPoint:="GetWindowLongPtr")> _
Private Shared Function GetWindowLongPtr(ByVal hWnd As HandleRef, <MarshalAs(UnmanagedType.I4)>nIndex As GWL) As IntPtr
Public Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" _
[DllImport("user32.dll", EntryPoint="GetWindowLong")]
private static extern IntPtr GetWindowLongPtr32(IntPtr hWnd, int nIndex);
[DllImport("user32.dll", EntryPoint="GetWindowLongPtr")]
private static extern IntPtr GetWindowLongPtr64(IntPtr hWnd, int nIndex);
// GetWindowLongPtr directly
public static IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex)
return GetWindowLongPtr64(hWnd, nIndex);
return GetWindowLongPtr32(hWnd, nIndex);
<DllImport("user32.dll", EntryPoint:="GetWindowLong")> _
Private Shared Function GetWindowLongPtr32(ByVal hWnd As HandleRef, ByVal nIndex As Integer) As IntPtr
<DllImport("user32.dll", EntryPoint:="GetWindowLongPtr")> _
Private Shared Function GetWindowLongPtr64(ByVal hWnd As HandleRef, ByVal nIndex As Integer) As IntPtr
' This static method is required because Win32 does not support GetWindowLongPtr dirctly
Public Shared Function GetWindowLongPtr(ByVal hWnd As HandleRef, ByVal nIndex As Integer) As IntPtr
Return GetWindowLongPtr64(hWnd, nIndex)
Return GetWindowLongPtr32(hWnd, nIndex)
result = GetWindowLongPtr(winhandle, GWL.GWL_ID);
static extern uint GetWindowModuleFileName(IntPtr hwnd,
Private Shared Function GetWindowModuleFileName(hwnd As IntPtr, _ GetWindowModuleFileName(hwnd, fileName, 2000);
/// 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" _
static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);
GetWindowPlacement(this.Handle, ref placement);
Private Declare Function GetWindowPlacement Lib "user32" (ByVal hwnd As IntPtr, ByRef lpwndpl As WINDOWPLACEMENT) As Integer
intRet = GetWindowPlacement(Me.Handle.ToInt32, wpTemp) 43: GetWindowPos
static extern TODO GetWindowPos(TODO);
Declare Function GetWindowPos Lib "user32.dll" (TODO) As TODO Use GetWindowRect Win32 method for position information. Use GetWindowPlacement Win32 method for a more detailed set of info such as Z-Order. 44: GetWindowRect
static extern bool GetWindowRect(IntPtr hwnd, out RECT lpRect);
Private Shared Function GetWindowRect(ByVal hWnd As HandleRef, ByRef lpRect As RECT) As Boolean
static extern bool GetWindowRect(HandleRef hWnd, out RECT lpRect);
if(!GetWindowRect(new HandleRef(this, this.Handle), out rct )) 45: GetWindowRgn
static extern int GetWindowRgn(IntPtr hWnd, IntPtr hRgn);
Private Shared Function GetWindowRgn(ByVal hWnd As IntPtr, ByVal hRgn As IntPtr) As Integer 46: GetWindowTex
/// GetWindowTextLength cannot retrieve the length of the text of an edit control in another application.
/// If the target window is owned by the current process, <see cref="GetWindowTextLength" /> causes a
/// <see cref="GetWindowTextLength" /> function may return a value that is larger than the actual length of the
/// occur when an application uses the ANSI version of <see cref="GetWindowTextLength" /> with a window whose window
/// procedure is Unicode, or the Unicode version of <see cref="GetWindowTextLength" /> with a window whose window
/// GetWindowText function.
static extern int GetWindowTextLength(IntPtr hWnd);
Private Shared Function GetWindowTextLength(ByVal hwnd As IntPtr) As Integer
class method GetWindowTextLength(hWnd: IntPtr): Int32; external;
Public Declare Function GetWindowTextLength Lib "user32.dll" Alias "GetWindowTextLengthA" _ Often used with GetWindowText (See GetWindowText.) 47: GetWindowText
static extern int GetWindowTextLength(IntPtr hWnd);
Private Shared Function GetWindowTextLength(ByVal hwnd As IntPtr) As Integer
class method GetWindowTextLength(hWnd: IntPtr): Int32; external;
Public Declare Function GetWindowTextLength Lib "user32.dll" Alias "GetWindowTextLengthA" _ Often used with GetWindowText (See GetWindowText.)
static extern int GetWindowTextLength(IntPtr hWnd);
Private Shared Function GetWindowTextLength(ByVal hwnd As IntPtr) As Integer
Public Declare Function GetWindowTextLength Lib "user32.dll" Alias "GetWindowTextLengthA" _ Often used with GetWindowText (See GetWindowText.)
static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);
static extern uint GetWindowThreadProcessId(IntPtr hWnd, IntPtr ProcessId);
Private Shared Function GetWindowThreadProcessId(ByVal hwnd As IntPtr, _
''' <param name="lpdwProcessId">A pointer to a variable that receives the process identifier. If this parameter is not NULL, GetWindowThreadProcessId copies the identifier of the process to the variable; otherwise, it does not. </param>
Private Declare Auto Function GetWindowThreadProcessId Lib "user32.dll" (ByVal hwnd As IntPtr, _
GetWindowThreadProcessId(lngAccessHwnd, lngPid)
Public Declare Auto Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As IntPtr, ByRef lpdwProcessId As IntPtr) As IntPtr
GetWindowThreadProcessId(hOwner, iProcessID)
IntPtr pID = GetWindowThreadProcessId(GetForegroundWindow(), IntPtr.Zero); GetWindowThreadProcessId returns the id of the thread that created the target window. To get the process id of a window, use the first c# signature above, and:
int threadID = GetWindowThreadProcessId(hWnd, out processID); 50: InvalidateRect
GetWindowRect(hWnd, out rct); 51: MoveWindow
internal static extern bool GetWindowRect(IntPtr hWnd, ref RECT rect);
GetWindowRect(id, ref Rect);
static extern uint RealGetWindowClass(IntPtr hwnd, [Out] StringBuilder pszType,
Private Shared Function RealGetWindowClass(ByVal hWnd As IntPtr, _
public static string RealGetWindowClassM(IntPtr hWnd)
RealGetWindowClass(hWnd, pszType, (UInt32)pszType.Capacity); 53: SB_GETTEXT
private static extern int GetWindowThreadProcessId(
StatusBar.GetWindowThreadProcessId(this._handle, out pid); 54: ScreenToClient
GetWindowRect(hWnd, out rct); 55: SendMessage
static int GetWindowTextLength(IntPtr hwnd) { uint foreThread = GetWindowThreadProcessId(GetForegroundWindow(), IntPtr.Zero);
SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE) ^ WS_EX_LAYERED);
ll_Ret = GetWindowLong(ll_handle, GWL_EXSTYLE) 58: SetWindowLong
// to the correct function (GetWindowLong in 32-bit mode and GetWindowLongPtr in 64-bit mode) 59: SetWindowPos
var windowRec = GetWindowRect(windowHandler); 60: TCITEM
GetWindowThreadProcessId((IntPtr)handle, out ProcessID);
static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId); Cut off search results after 60. Please refine your search. |