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.
起動時にフォームとトレイアイコンを開くプロセスがあります。上記のexeプロセスのフォームとトレイアイコンのハンドルと、このexeのすべての子ウィンドウのハンドルをac#アプリケーションから見つけたいと思います。
ありがとう。
ウィンドウハンドルの場合、最も使いやすいSystem.Diagnostics.ProcessプロパティMainWindowHandleです。他のプロセスをどのように識別したいかは述べませんが、Processクラスにはそのための多くのオプションがあります。
System.Diagnostics.Process
MainWindowHandle
Process
通知領域のアイコンに関しては、あなたが求めているもののためのAPIはありません。Shell_NotifyIcon連携するには、APIをフックするか、他のプロセスを変更する必要があります。
Shell_NotifyIcon