简体   繁体   English

画在屏幕上,C#

[英]Draw on the screen, C#

I seek a C# method that can print data on the screen 'externally'. 我寻求一种可以在屏幕上“外部”打印数据的C#方法。
Basically, I have an DX9 application, and I want to 'paint on it.'. 基本上,我有一个DX9应用程序,我想'画上它'。
I tried the Graphics.FromHwnd(0); 我试过Graphics.FromHwnd(0); method, but its flickering and its not as good as I want it to be. 方法,但它的闪烁,它不如我想要的那样好。
I know theres a lot of application like Skype that can draw on the monitor, 'above' all other applications, but I can't understand how to do it programically. 我知道很多像Skype一样的应用程序可以在显示器上绘制,“高于”所有其他应用程序,但我无法理解如何以编程方式进行操作。

I will be very greatful if you could help me. 如果你能帮助我,我会非常感激的。
Mark 标记

Just create a form whose 只需创建一个表格

form.TopMost=true

You may want to create a transparent form so that the form itself is invisible. 您可能希望创建透明表单,以便表单本身不可见。

You may even want to create a non-rectangular form . 您甚至可能想要创建一个非矩形的表单

Sometimes overriding the OnBackgroundPaint event will produce fewer flickers. 有时重写OnBackgroundPaint事件会产生更少的闪烁。 You might want to try that. 你可能想尝试一下。

Otherwise, I don't know what your code is doing to cause the flickers in the first place. 否则,我不知道你的代码是做什么来引起闪烁的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM