我可以得出一个Form上,上述所有的控制? [英] Can I draw on a Form, above all controls?

查看:132
本文介绍了我可以得出一个Form上,上述所有的控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能为我画首先控件的表格

我有一些控件(文本框按钮 COM对象我的形式),键,我想提请他们,覆盖以前由他们绘制。

我使用 Windows窗体的像素 C#

注:在图形类的控件绘制下...

Is it possible for me to draw ABOVE all controls on a form?
I have some controls (textboxes, buttons, COM objects) on my form, and I wish to draw ON them, overriding any pixels previously drawn by them.
I am using Windows Forms on C#.
NOTE: the Graphics class draws under the controls...

推荐答案

拿这篇文章在看代码:

笼络WinForms控件

笔者创建了一个组件,它(他描述它)就像是在你的表单一块玻璃。然后,您的代码将在这个玻璃过度管制,它覆盖的形式,等等。

The author has created a component that (as he describes it) is like a piece of glass over your form. Your code then draws on this 'glass,' over controls, the form it overlays, etc.

一个严重的限制,这会影响你的是,它并没有画过一些控件(包括文本框)。这些限制(和原因他们)的文章中描述,但本文中的代码可能是你在找什么(或者可以作为一个起点,为自己的解决方案)。

One serious limitation which will affect you is that it does not draw over some controls (including the TextBox). These limitations (and the reasons for them) are described in the article but the code in the article might be what you're looking for (or might serve as a starting point for your own solution).

这篇关于我可以得出一个Form上,上述所有的控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆