Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个在启动时打开表单和托盘图标的过程。我想从ac#应用程序中发现上面exe进程的窗体和托盘图标的句柄是什么,以及这个exe的所有子窗口的句柄是什么。
谢谢。
对于窗口句柄,它是最容易使用System.Diagnostics.Process和MainWindowHandle属性的。你没有说明你想如何识别另一个进程,但是这个Process类有很多选项。
System.Diagnostics.Process
MainWindowHandle
Process
关于通知区域图标,您所询问的内容没有 API。您需要挂钩Shell_NotifyIconAPI 或修改其他进程以进行合作。
Shell_NotifyIcon