在其他窗口上覆盖文本 - HUD
我有兴趣编写一个覆盖小型平视显示器的应用程序(HUD)在 VB.NET 中的另一个应用程序上。有什么例子吗?
我需要枚举所有打开的窗口以找到我想要的窗口,然后在窗口的特定位置覆盖一些文本。如果用户移动该窗口,我的文本将需要跟随。 (我可能会一遍又一遍地循环绘制文本)。
编辑:没有人回答我原来的查询 - 我将 C# 添加到关键字中,看看该语言的专家是否有答案。
I am interested in writing an application that overlays a small heads up display (HUD) over another application, in VB.NET. What is an example of this?
I will need to enumerate all open windows to find the window that I want, and then overlay some text in a specific position on the window. If the user moves that window, my text will need to follow. (I will probably be painting the text in a loop over and over).
Edit: nobody answered my original query - I added C# to the keywords to see if any of gurus in that language might have an answer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 WinApi 枚举窗口。
你可以开始谷歌搜索
当你找到你的窗口并有它的句柄时,用类似的东西在它上面绘制是没有问题的
但是要覆盖... 一种可能的解决方案是创建自己的无边框表单(它甚至可以变得透明) )并将您的文字放在上面。然后只需将此特殊表格放在另一个应用程序之上即可。
You can use WinApi to enumerate windows.
You can start googling with
When you have found your window and has its handle, there is no problem to plot on it with something like
But to overlay... One possible solution is to create own border less form(it can be made even transparent) and place your text on it. Then just place this special form on top of another application.