透明的RichTextBox透明、RichTextBox

2023-09-02 12:00:22 作者:轻颦浅笑

我怎样才能让我的富文本框透明 我想这因为我正在试图把一个文本上的图形图像的顶部(这是我的表格背景)。

how can I make my richtext box transparent I want this cuz I am trying to put a text on top of a graphic image (which is the background of my form).

这就是为什么我想在RichTextBox是透明的, 我使用.NET,C#和在Windows窗体应用程序

That is why I wanted the richTextBox to be transparent, I am using .NET ,c# and in a windows form application

推荐答案

有没有这样的事情,真透明了的WinForms控制。透明模式继承其父的默认背景。我周围有过去的工作方式是使用了的OnPaint 事件,然后使用 Graphics.DrawString 法位置,我想它的文本。

There is no such thing as true transparency in a WinForms Control. Transparent mode inherits the default background of its parent. The way I have worked around it in the past has been to use the OnPaint event and then use the Graphics.DrawString method to position the text where I want it.