Пример #1
0
        public static WindowEntry Create(IntPtr hWnd, uint processId)
        {
            var windowTitle = GetWindowTitle(hWnd);

            var iconHandle = WindowIcon.GetAppIcon(hWnd);
            var isVisible  = !IsIconic(hWnd);

            return(new WindowEntry
            {
                HWnd = hWnd,
                Title = windowTitle,
                ProcessId = processId,
                IconHandle = iconHandle,
                IsVisible = isVisible
            });
        }
Пример #2
0
        public static WindowEntry Create(IntPtr hWnd, uint processId)
        {
            var windowTitle = GetWindowTitle(hWnd);

            var iconHandle     = WindowIcon.GetAppIcon(hWnd);
            var isVisible      = !IsIconic(hWnd);
            var executablePath = ProcessExtensions.GetExecutablePath((int)processId);


            return(new WindowEntry
            {
                HWnd = hWnd,
                Title = windowTitle,
                ProcessId = processId,
                IconHandle = iconHandle,
                IsVisible = isVisible,
                ExecutablePath = executablePath
            });
        }