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 "HWND" in [All]

oleacc

.

AccessibleObjectFromWindow(hWnd, (uint) OBJID.WINDOW, ref guid, ref accessible);

.

public static extern uint AccessibleObjectFromEvent( IntPtr hwnd, uint dwObjectID, uint dwChildID, out IAccessible ppacc, [MarshalAs(UnmanagedType.Struct)] out object pvarChild);

.

        IntPtr hwnd = GetFocusedWindow();

.

        AccessibleObjectFromEvent(hwnd, 0, 0, out accWindow, out objChild);

.

    private static extern uint AccessibleObjectFromEvent(IntPtr hwnd, uint dwObjectID, uint dwChildID,

.

         IntPtr hwnd,

.

    Private Declare Function AccessibleObjectFromWindow Lib "oleacc" (ByVal Hwnd As Int32, _

.

    Private Declare Function AccessibleObjectFromWindow Lib "oleacc" (ByVal Hwnd As Int32, _

.

    Dim hWnd As Int32 = GetForegroundWindow()

.

    Dim aaVal As Int32 = AccessibleObjectFromWindow(hWnd, ID, IID_IAcce, varChild)

.

    int retVal = AccessibleObjectFromWindow(hwnd, (uint)OBJID.WINDOW, ref guid, ref obj);

.

IntPtr hWnd = GetThatWindow(); // from wherever

.

if ( SendMessageTimeout(hWnd, nMsg, UIntPtr.Zero, IntPtr.Zero,

.

public static extern uint WindowFromAccessibleObject(IAccessible pacc, ref IntPtr phwnd );

.

Declare Function WindowFromAccessibleObject Lib "oleacc.dll" (ByVal pacc as IAccessible, ByRef phwnd as IntPtr) As Integer

.

    public static extern uint WindowFromAccessibleObject(IAccessible pacc, ref IntPtr phwnd);

comctl32

.

        Dim hwnd As IntPtr

.

        SetReaderModeInfo.hwnd = Me.Handle

.

    Public Shared Function GetScrollPos(ByVal hWnd As IntPtr, ByVal nBar As Integer) As Integer

.

    Private Shared Function SetScrollPos(ByVal hWnd As IntPtr, ByVal nBar As Integer, ByVal nPos As Integer, ByVal bRedraw As Boolean) As Integer

.

/// <param name="hwndLock">Handle to the window that owns the drag image.</param>

.

internal static extern bool ImageList_DragEnter(IntPtr hwndLock, int x, int y);

.

''' <param name="hwndLock">Handle to the window that owns the drag image.</param>

.

Friend Shared Function ImageList_DragEnter(hwndLock As IntPtr, x As Integer, y As Integer) As <MarshalAs(UnmanagedType.Bool)> Boolean

.

/// <param name="hwndLock">Handle to the window that owns the drag image.</param>

.

internal static extern bool ImageList_DragLeave(IntPtr hwndLock);

.

''' <param name="hwndLock">Handle to the window that owns the drag image.</param>

.

Friend Shared Function ImageList_DragLeave(hwndLock As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean

.

        public IntPtr hwndParent;

.

        public IntPtr hwndParent;

setupapi

.

ByVal EnumPtr As Long, ByVal hwndParent As Long, _

.

    public static extern IntPtr SetupDiGetClassDevs(ref Guid classGuid, IntPtr enumerator, IntPtr hwndParent, UInt32 flags);

.

                                              IntPtr hwndParent,

.

   IntPtr hwndParent,

.

   IntPtr hwndParent,

.

    ByVal hwndParent As Integer, _

.

    ByRef hwndParent As String, _

.

    ByVal hwndParent As IntPtr, _

.

        public IntPtr hwndParent;

.

        Public hwndParent As IntPtr

psapi

.

IntPtr hWnd = WindowFromPoint(pt);

.

GetWindowThreadProcessId(hWnd, out pid);

shell32

.

    //        HWND hWnd;

.

    public IntPtr hWnd;

.

    public IntPtr hWnd;

.

    Public hWnd As IntPtr

.

    public IntPtr hWnd;

.

  myBarData.hWnd = MyBar.Handle;

.

static extern void DragAcceptFiles(IntPtr hwnd, bool fAccept);

.

    ByVal hwnd As Long, _

.

     void AddTab(IntPtr hwnd);

.

     void DeleteTab(IntPtr hwnd);

.

     void ActivateTab(IntPtr hwnd);

.

     void SetActiveAlt(IntPtr hwnd);

.

     IntPtr hwnd,

.

     void SetProgressValue(IntPtr hwnd, UInt64 ullCompleted, UInt64 ullTotal);

.

     void SetProgressState(IntPtr hwnd, TaskbarProgressBarStatus tbpFlags);

.

     void RegisterTab(IntPtr hwndTab, IntPtr hwndMDI);

.

     void UnregisterTab(IntPtr hwndTab);

.

     void SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore);

.

     void SetTabActive(IntPtr hwndTab, IntPtr hwndInsertBefore, uint dwReserved);

.

     IntPtr hwnd,

.

     IntPtr hwnd,

.

     void ThumbBarSetImageList(IntPtr hwnd, IntPtr himl);

.

       IntPtr hwnd,

.

     IntPtr hwnd,

.

     IntPtr hwnd,

.

     void SetTabProperties(IntPtr hwndTab, SetTabPropertiesOption stpFlags);

.

    Sub AddTab(hwnd As IntPtr)

.

    Sub DeleteTab(hwnd As IntPtr)

.

    Sub ActivateTab(hwnd As IntPtr)

.

    Sub SetActiveAlt(hwnd As IntPtr)

.

    Sub MarkFullscreenWindow(hwnd As IntPtr, <MarshalAs(UnmanagedType.Bool)> fFullscreen As Boolean)

.

    Sub SetProgressValue(hwnd As IntPtr, ullCompleted As UInt64, ullTotal As UInt64)

.

    Sub SetProgressState(hwnd As IntPtr, tbpFlags As TaskbarProgressBarStatus)

.

    Sub RegisterTab(hwndTab As IntPtr, hwndMDI As IntPtr)

.

    Sub UnregisterTab(hwndTab As IntPtr)

.

    Sub SetTabOrder(hwndTab As IntPtr, hwndInsertBefore As IntPtr)

.

    Sub SetTabActive(hwndTab As IntPtr, hwndInsertBefore As IntPtr, dwReserved As UInteger)

.

    Function ThumbBarAddButtons(hwnd As IntPtr, cButtons As UInteger, <MarshalAs(UnmanagedType.LPArray)> pButtons As ThumbButton()) As HResult

.

    Function ThumbBarUpdateButtons(hwnd As IntPtr, cButtons As UInteger, <MarshalAs(UnmanagedType.LPArray)> pButtons As ThumbButton()) As HResult

.

    Sub ThumbBarSetImageList(hwnd As IntPtr, himl As IntPtr)

.

    Sub SetOverlayIcon(hwnd As IntPtr, hIcon As IntPtr, <MarshalAs(UnmanagedType.LPWStr)> pszDescription As String)

.

    Sub SetThumbnailTooltip(hwnd As IntPtr, <MarshalAs(UnmanagedType.LPWStr)> pszTip As String)

.

    Sub SetThumbnailClip(hwnd As IntPtr, prcClip As IntPtr)

.

    Sub SetTabProperties(hwndTab As IntPtr, stpFlags As SetTabPropertiesOption)

.

    /// <param name="hWnd"></param>

.

    void MarkFullscreenWindow([In] IntPtr hWnd, [In] int fFullscreen);

.

    /// <param name="hWnd">A handle to the window to be added to the taskbar.</param>

.

    void AddTab(IntPtr hWnd);

.

    /// <param name="hWnd">A handle to the window to be deleted from the taskbar.</param>

.

    void DeleteTab(IntPtr hWnd);

.

    /// <param name="hWnd">A handle to the window on the taskbar to be displayed as active.</param>

.

    void ActivateTab(IntPtr hWnd);

.

    /// <param name="hWnd">A handle to the window to be marked as active.</param>

.

    void SetActiveAlt(IntPtr hWnd);

.

    /// <param name="hWnd"></param>

.

    void MarkFullscreenWindow(IntPtr hWnd, int fFullscreen);

.

    /// <param name="hWnd">The handle of the window whose associated taskbar button is being used as

.

    void SetProgressValue(IntPtr hWnd, ulong ullCompleted, ulong ullTotal);

.

    /// <param name="hWnd">The handle of the window in which the progress of an operation is being

.

    void SetProgressState(IntPtr hWnd, TBPFLAG tbpFlags);

.

    /// <param name="hWndTab">Handle of the tab or document window. This value is required and cannot

.

    /// <param name="hWndMDI">Handle of the application's main window. This value tells the taskbar

.

    void RegisterTab(IntPtr hWndTab, IntPtr hWndMDI);

.

    /// <param name="hWndTab">The handle of the tab window whose thumbnail is being removed. This is the same

.

    void UnregisterTab(IntPtr hWndTab);

.

    /// <param name="hWndTab">The handle of the tab window whose thumbnail is being placed. This value

.

    /// <param name="hWndInsertBefore">The handle of the tab window whose thumbnail that hwndTab is

.

    void SetTabOrder(IntPtr hWndTab, IntPtr hWndInsertBefore);

.

    /// <param name="hWndTab">Handle of the active tab window. This handle must already be registered

.

    /// <param name="hWndMDI">Handle of the application's main window. This value tells the taskbar

.

    void SetTabActive(IntPtr hWndTab, IntPtr hWndMDI, UInt32 tbatFlags);

.

    /// <param name="hWnd">The handle of the window whose thumbnail representation will receive the toolbar.

.

    IntPtr hWnd,

.

    IntPtr hWnd,

.

    /// <param name="hWnd">The handle of the window whose thumbnail representation contains the toolbar to be

.

    void ThumbBarSetImageList(IntPtr hWnd, IntPtr himl);

.

    /// <param name="hWnd">The handle of the window whose associated taskbar button receives the overlay.

.

    /// a valid HWND or the call is ignored.</param>

.

    void SetOverlayIcon(IntPtr hWnd, IntPtr hIcon, string pszDescription);

.

    /// <param name="hWnd">The handle to the window whose thumbnail displays the tooltip. This handle must

.

    /// in which case the title of the window specified by hwnd is used as the tooltip.</param>

.

    void SetThumbnailTooltip(IntPtr hWnd, string pszTip);

.

    /// <param name="hWnd">The handle to a window represented in the taskbar.</param>

.

    void SetThumbnailClip(IntPtr hWnd, IntPtr prcClip);

.

     void AddTab(IntPtr hwnd);

.

     void DeleteTab(IntPtr hwnd);

.

     void ActivateTab(IntPtr hwnd);

.

     void SetActiveAlt(IntPtr hwnd);

.

     IntPtr hwnd,

.

     void SetProgressValue(IntPtr hwnd, UInt64 ullCompleted, UInt64 ullTotal);

.

     void SetProgressState(IntPtr hwnd, TaskbarProgressBarStatus tbpFlags);

.

     void RegisterTab(IntPtr hwndTab, IntPtr hwndMDI);

.

     void UnregisterTab(IntPtr hwndTab);

.

     void SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore);

.

     void SetTabActive(IntPtr hwndTab, IntPtr hwndInsertBefore, uint dwReserved);

.

     IntPtr hwnd,

.

     IntPtr hwnd,

.

     void ThumbBarSetImageList(IntPtr hwnd, IntPtr himl);

.

       IntPtr hwnd,

.

     IntPtr hwnd,

.

     IntPtr hwnd,

.

     void SetTabProperties(IntPtr hwndTab, SetTabPropertiesOption stpFlags);

.

private static extern int PickIconDlg(IntPtr hwndOwner, System.Text.StringBuilder lpstrFile, int nMaxFile, ref int lpdwIconIndex);

.

Declare Unicode Function PickIconDlg Lib "Shell32" Alias "PickIconDlg" (ByVal hwndOwner As IntPtr, ByVal lpstrFile As String, ByVal nMaxFile As Integer, ByRef lpdwIconIndex As Integer) As Integer

24: Run
.

public static extern string Shell(IntPtr HWND, string operation, string file, string parameters, string directory, int showcmd);

.

Can use IntPtr Pointer HWND or integer value int frist line.

.

    Public hWnd As IntPtr

.

    Private Shared Function MoveWindow(ByVal hWnd As IntPtr, ByVal x As Integer, ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer,

.

    Friend Sub RegisterBar(ByVal hWnd As IntPtr, ByRef uCallbackMessage As Int32, ByVal idealSize As Size, ByVal DockEdge As ABEdge)

.

    abd.hWnd = hWnd

.

    ABSetPos(hWnd, idealSize, DockEdge)

.

    Friend Sub UnregisterAppBar(ByVal hWnd As IntPtr)

.

    abd.hWnd = hWnd

.

    Friend Sub ABSetPos(ByVal hWnd As IntPtr, ByVal idealSize As Size, ByVal DockEdge As ABEdge)

.

    abd.hWnd = hWnd

.

    MoveWindow(abd.hWnd, abd.rc.left, abd.rc.top, abd.rc.right - abd.rc.left, abd.rc.bottom - abd.rc.top, True)

.

    'abd.hWnd = FindWindow("Shell_TrayWnd", "") 'Tasbar Handle

.

    abd.hWnd = MyDockForm.Handle

.

    Dim hWndAppBar As Long

.

        ABD.hWnd = FindWindow("Shell_TrayWnd", "")

.

        hWndAppBar = SHAppBarMessage(CType(ABMsg.ABM_GETAUTOHIDEBAR, Integer), ABD)

.

        If hWndAppBar > 0 Then

.

        IntPtr hwnd,

.

        IntPtr hwnd,

.

        IntPtr hwndOwner,    

.

        IntPtr hwndOwner,

.

          IntPtr hwndOwner,

.

        IntPtr hwnd,    

.

        // this flag is set.  Passing the message BFFM_SETSTATUSTEXTA to the hwnd can set the

.

        public static extern IntPtr SendMessage(HandleRef hWnd, uint Msg, int wParam, IntPtr lParam);

.

        public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, string lParam);

.

        public delegate int BrowseCallBackProc(IntPtr hwnd, int msg, IntPtr lp, IntPtr wp);

.

            public IntPtr hwndOwner;

.

        public int OnBrowseEvent(IntPtr hWnd, int msg, IntPtr lp, IntPtr lpData)

.

                //Win32.SendMessage(new HandleRef(null, hWnd), BFFM_SETSELECTIONA, 1, lpData);

.

                SendMessage(new HandleRef(null, hWnd), BFFM_SETSELECTIONW, 1, _initialPath);

.

                SendMessage(new HandleRef(null, hWnd), BFFM_SETSTATUSTEXTW, 0, pathPtr);

.

            bi.hwndOwner = parentHandle;

.

            IntPtr hWnd,

.

            IntPtr hWnd,

.

static extern int SHCreateDirectoryEx(IntPtr hwnd, string pszPath, IntPtr psa);

.

static extern int ShellAbout(IntPtr hWnd, string szApp, string szOtherStuff, IntPtr hIcon);

.

Declare Ansi Function ShellAbout Lib "shell32.dll" Alias "ShellAboutA" (ByVal hWnd As IntPtr, ByVal szApp As String, ByVal szOtherStuff As String, ByVal hIcon As IntPtr) As Integer

.

    Public hwnd As IntPtr

.

        public IntPtr hwnd;

.

        public IntPtr hWnd;

.

        notifyIcon.hWnd = windowHandle;

.

        public IntPtr hWnd;

.

        notifyIcon.hWnd = windowHandle;

.

static extern int SHEmptyRecycleBin(IntPtr hWnd, string pszRootPath,

.

        static extern int SHEmptyRecycleBin(IntPtr hWnd, string pszRootPath, uint dwFlags);

.
  • Always set hwnd to my main app window (I was using IntPtr.Zero, this might not be required)
.

        public IntPtr hwnd;

.

    public IntPtr hwnd

.

            this._ShFile.hwnd = value;

.

        this._ShFile.hwnd = IntPtr.Zero;

.

static extern uint SHFormatDrive(IntPtr hwnd, uint drive, uint fmtID,

.

static extern uint SHFormatDrive(IntPtr hwnd, uint drive, SHFormatFlags fmtID,

.

The hwnd field should be the handle of the required parent calling window (see http://msdn.microsoft.com/en-us/library/bb762169.aspx). passing in <parent window>.Handle (in C#) works in XP, but in Vista it does not. What works on Vista is passing in 0 (IntPtr.Zero). I have tested this on WP SP2 and it works there as well.

.

NOTE- See the Note above about the hwnd field and Vista. Use

.

static extern int SHGetFolderLocation(IntPtr hwndOwner, int nFolder,

.

static extern int SHGetFolderPath(IntPtr hwndOwner, int nFolder, IntPtr hToken,

.

    Private Shared Function SHGetFolderPath(ByVal hwndOwner As IntPtr, ByVal nFolder As Int32, ByVal hToken As IntPtr, ByVal dwFlags As Int32, ByVal pszPath As StringBuilder) As Int32

.

        IntPtr hwndLock,

.

        IntPtr hwndLock);

.

    Private Shared Function SHGetFolderLocation(hwndOwner As IntPtr, nFolder As Integer,

.

static extern int SHGetSpecialFolderLocation(IntPtr hwndOwner, CSIDL nFolder,

.

        (ByVal prmlngHwndOwner As Long, _

.

        static extern int SHGetSpecialFolderLocation(IntPtr hwndOwner, CSIDL nFolder, ref IntPtr ppidl);

.

   static extern int SHGetSpecialFolderPath(IntPtr hwndOwner, IntPtr lpszPath, int nFolder, int fCreate);

.

<DllImport("Shell32.dll")> Shared Function SHGetSpecialFolderPath(ByVal hwndOwner As IntPtr,

.

static extern bool SHObjectProperties(uint32 hwnd, uint32 shopObjectType, [MarshalAs(UnmanagedType.LPWStr)] string pszObjectName, [MarshalAs(UnmanagedType.LPWStr)] string pszPropertyPage);

.

    (ByVal hwnd As UInt32, ByVal shopObjectType As UInt32, _

.

Took me forever (okay, less than an hour) to figure out that this function failed with Integers or Longs and it wanted UInt32 for hwnd and shopObjectType.

.

    (ByVal hwnd As UInt32, ByVal shopObjectType As UInt32, _

.

    private static extern int SHOpenWithDialog(IntPtr hWndParent, ref tagOPENASINFO oOAI);

.

        IntPtr hwndParent = IntPtr.Zero;

.

        if (null != MyAppForm) hwndParent = MyAppForm.Handle;

.

        SHOpenWithDialog(hwndParent, ref oOAI);

.

static extern bool SHRunFileDialog(IntPtr hwndOwner, IntPtr hIcon, string lpszPath, string lpszDialogTitle, string lpszDialogTextBody, RunFileDialogFlags uflags);

odbc32

.

        IntPtr    hwnd,

.

    Private Shared Function SQLDriverConnect(ByVal hdbc As IntPtr, ByVal hwnd As IntPtr, ByVal szConnStrIn As String, _

printui

.

private static extern void PrintUIEntryW(IntPtr hwnd, IntPtr hinst, string lpszCmdLine, int nCmdShow);

Interfaces

.

     int AddDesktopItemWithUI(IntPtr hwnd, ref COMPONENT pcomp, DtiAddUI dwFlags);

.

     int AddUrl(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszSource, ref COMPONENT pcomp, AddURL dwFlags);

.

    Function AddDesktopItemWithUI(ByVal hwnd As IntPtr, ByRef pcomp As COMPONENT, ByVal dwFlags As DtiAddUI) As Integer

.

    Function AddUrl(ByVal hwnd As IntPtr, <MarshalAs(UnmanagedType.LPWStr)> ByVal pszSource As String, ByRef pcomp As COMPONENT, ByVal dwFlags As AddURL) As Integer

.

   void Authenticate(IntPtr phwnd,

.

   Sub Authenticate(IntPtr phwnd,

.

    /// <param name="phwnd">The HWND of the parent window for a default user interface.</param>

.

    ///Client should also set phwnd to zero.</param>

.

    public void Authenticate(IntPtr phwnd, ref string pszUsername, ref string pszPassword)

.

        phwnd = IntPtr.Zero;

.

        IntPtr hwndEdit,

.

        int GetWindow(out IntPtr phwnd);

.

    Public Overridable Sub GetWindow(ByRef phwnd As System.IntPtr) Implements IDeskBand.GetWindow, IDockingWindow.GetWindow, IOleWindow.GetWindow

.

    phwnd = Handle

.

    Sub GetWindow(ByRef phwnd As System.IntPtr)

.

    Sub GetWindow(ByRef phwnd As System.IntPtr)

.

    Sub GetWindow(ByRef phwnd As System.IntPtr)

.

    Public hwnd As IntPtr

.

        int GetWindow(out IntPtr phwnd);

.

    Public Overridable Sub GetWindow(ByRef phwnd As System.IntPtr) Implements IDeskBand.GetWindow, IDockingWindow.GetWindow, IOleWindow.GetWindow

.

    phwnd = Handle

.

    Sub GetWindow(ByRef phwnd As System.IntPtr)

.

    Sub GetWindow(ByRef phwnd As System.IntPtr)

.

    Sub GetWindow(ByRef phwnd As System.IntPtr)

.

    Public hwnd As IntPtr

.

     uint ShowMessage(IntPtr hwnd,

.

     uint ShowHelp(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszHelpFile,

.

    Function ShowMessage(ByVal hwnd As IntPtr, <MarshalAs(UnmanagedType.LPWStr)> ByVal lpstrText As String, <MarshalAs(UnmanagedType.LPWStr)> ByVal lpstrCaption As String, ByVal dwType As Integer, <MarshalAs(UnmanagedType.LPWStr)> ByVal lpstrHelpFile As String, ByVal dwHelpContext As Integer, ByRef lpResult As Integer) As Integer

.

    Function ShowHelp(ByVal hwnd As IntPtr, <MarshalAs(UnmanagedType.LPWStr)> ByVal pszHelpFile As String, ByVal uCommand As Integer, ByVal dwData As Integer, ByVal ptMouse As tagPoint, <MarshalAs(UnmanagedType.IDispatch)> ByVal pDispatchObjectHit As Object) As Integer

.

        [In] IntPtr hwnd,

.

    void DragEnter([In] IntPtr hwndTarget, [In, MarshalAs(UnmanagedType.Interface)] IDataObject_Com dataObject, [In] ref drawing.Point pt, [In] DragDropEffects effect);

.

        dropHelper.DragEnter(hWnd, e.Data as IDataObject_Com, ref point, e.Effects);

.

                   [In, ComAliasName ( "ShellObjects.wireHWND" )] ref IntPtr hwnd,

.

             HandleRef hwndParent,

.

             ByVal hwndParent As IntPtr,

.

    void Redirect ( [In] ref Guid rfid, [In] IntPtr hwnd, [In] uint Flags,

.

    void Redirect ( [In] ref Guid rfid, [In] IntPtr hwnd, [In] uint Flags,

.

     void DoVerb(uint iVerb, uint lpmsg, object pActiveSite, uint lindex, uint hwndParent, uint lprcPosRect);

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: