IntPtr taskbarWnd = WinApi.FindWindow("ShellTrayWnd", null); IntPtr trayWnd =…
Jump to turn (7)
- 1IntPtr taskbarWnd = WinApi.FindWindow("ShellTrayWnd", null); IntPtr trayWnd = Wi
- 2上面代码中能不能直接获取最后一个图标的位置信息并作移动?
- 3上面代码中的SendMessage函数应该怎么声明?
- 4如果要遍历得到TBBUTTONCOUNT其中各按钮的信息,应该怎么写?
- 5TBBUTTONINFO 应该怎么声明?
- 6上面代码中的TBIFIMAGE | TBIFSIZE | TBIFCOMMAND | TBIFLPARAM、TBGETBUTTONINFO 、TBGETBUTT
- 7SendMessage(toolbarWindow32, TBGETITEMRECT, lastButtonIndex, out rect);测试发现这一句并没
- User
IntPtr taskbarWnd = WinApi.FindWindow("Shell_TrayWnd", null); IntPtr trayWnd = WinApi.FindWindowEx(taskbarWnd, IntPtr.Zero, "TrayNotifyWnd", null); IntPtr reBarWnd = WinApi.FindWindowEx(trayWnd, IntPtr.Zero, "ReBarWindow32", null); IntPtr notifyIconOverflowWindow = WinApi.FindWindowEx(reBarWnd, IntPtr.Zero, "NotifyIconOverflowWindow", null); IntPtr notificationAreaWindow = WinApi.FindWindowEx(reBarWnd, IntPtr.Zero, "NotificationAreaWindow", null); IntPtr sysPager = WinApi.FindWindowEx(notificationAreaWindow, IntPtr.Zero, "SysPager", null); IntPtr toolbarWindow32 = WinApi.FindWindowEx(sysPager, IntPtr.Zero, "ToolbarWindow32", null); int count = SendMessage(toolbarWindow32, TB_BUTTONCOUNT, 0, IntPtr.Zero); for (int i = 0; i < count; i++) { RECT rect; SendMessage(toolbarWindow32, TB_GETITEMRECT, i, out rect); WinApi.MoveWindow(this.Handle, rect.right - 16, rect.top, 16, rect.bottom - rect.top, true); }
以上代码做了什么?
- Assistant