渐变文本框控件C# [英] Gradient TextBox Control C#

查看:98
本文介绍了渐变文本框控件C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有很多关于创建渐变按钮的文章.但是,我知道某些软件具有特殊的文本框控件,并且非常好用(例如:诺基亚PC套件,或类似http://4.bp.blogspot.com/_DsTN2TagWBQ/THAffzWqbRI/AAAAAAAAAGo/b1_XaGW16uc/s320/myfinal.gif.任何人都知道如何绘制这样的文本框吗?我是初学者,需要对此进行研究.

感谢所有

There was many very articles talking about creating a gradient button. However, i know some softwares have the special textbox control and it''s very nice (like: Nokia PC Suite, or like this http://4.bp.blogspot.com/_DsTN2TagWBQ/THAffzWqbRI/AAAAAAAAAGo/b1_XaGW16uc/s320/myfinal.gif. Any body know how drawing textbox like this? I''m a beginner and i need study about this.

Thanks all

推荐答案

在GDI +中我能找到的最接近的东西是:
The closest thing I could find for doing this in GDI+ is this: Owner-drawing a Windows.Forms TextBox. However, I think interop with WPF would be your best bet.


不确定是否使用WPF,ASP.NET或Windows窗体,但可以在WPF中轻松地做到这一点: http://www.vbdotnetheaven.com/UploadFile/dbeniwal321/WPFTextBox01052009013240AM/WPFTextBox.aspx .

您还可以使用Interop来获取WPF文本框,使其出现在Windows窗体应用程序中:http://www.developerfusion.com/community/blog-entry/8393574/wpfwinforms-interop-a-highlighted-textbox/.
Not sure if you are using WPF, ASP.NET, or Windows Forms, but you can do this fairly easily in WPF: http://www.vbdotnetheaven.com/UploadFile/dbeniwal321/WPFTextBox01052009013240AM/WPFTextBox.aspx.

You can also use Interop to get a WPF textbox to appear in a Windows Forms application: http://www.developerfusion.com/community/blog-entry/8393574/wpfwinforms-interop-a-highlighted-textbox/.


我刚发现另一个潜在的解决方案.也许您可以使用 AlphaBlendTextBox-用于.NET的透明/半透明文本框,并将其覆盖在渐变图像.

还有一个: Alpha混合(透明功能)TextBox和RichTextBox .

更新:我注意到此消息提供了一种非常简短的方法一个透明的RichTextBox.
I just found another potential solution. Perhaps you could use the AlphaBlendTextBox - A transparent/translucent textbox for .NET and overlay it on top of a gradient image.

There is also this: Alpha Blended (Transparent Capable) TextBox and RichTextBox.

UPDATE: I noticed this message provides a very short way of making a transparent RichTextBox.


这篇关于渐变文本框控件C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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