Windows 窗体检查器,通过单击
我想为 Windows 应用程序创建一个检查器。 这样我就可以启动它(从应用程序本身内部) - 它可能会给我一个十字准线,我可以单击表单/用户控件中的一个项目 - 按钮、列表或类似的项目,它会返回我单击的控件名称也许还有它所处的形式。 所以理想情况下,我不会必须动态地添加一个点击到我正在查看的表单中的所有内容,并从中捕获项目..
大概这是可能的吗? 有人可以给我指点或2 非常感谢任何帮助,
感谢
nat
I am wanting to make an inspector of sorts for a windows app.
so that I can fire it up (from inside the app itself) - it will give me a crosshair maybe and I can click on an item in a form/usercontrol - button, list or some such and it will return me the clicked controls name and maybe the form in which it sits.
so ideally I wouldn't have to dynamically add a click to absolutely everything in the form I am viewing, and catch the item from that..
presumably this is possible?
could someone maybe give me a pointer or 2
any help greatly appreciated
thanks
nat
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您已经看过鹰眼了吗?这应该适用于任何一般应用程序,包括 Winforms。对于 WPF,有一个名为 Snoop 的特殊应用程序。这两个工具都是开源的,因此如果您想自己实现某些功能,可以查看它们的代码。
Have you already seen the Hawkeye? This should work for any general application, including Winforms. For WPF there is a special application called Snoop. Both tools are open source so you can look into their code if you want to implement something on your own.
nuget 包 WinForm.Inspector.Tool 可能是最好的选择现在就在那里。
The nuget package WinForm.Inspector.Tool is probably the best choice out there right now.