他是什么人来实现用C#为 System.Windows.Forms.TextBox
在.net 2.0水印功能最好的方法是什么?
What is he best way to implement Watermark functionality for a System.Windows.Forms.TextBox
in .Net 2.0 with C#?
编辑:
使用现成的组件从$ C $的CProject是很容易的。这也是一个在code项目开放许可(CPOL)。
Using the ready-made component from CodeProject was very easy. It's also with a The Code Project Open License (CPOL).
最近我需要一个水印的文本框,那突然出现在我的头上的第一件事就是OnLeave和的OnEnter文本框的事件,但首先我GOOGLE了它,我有两个链接第一个是它使用了System.Drawing命名空间,另外一个在这里使用SendMessage()在这里http://vidmar.net/weblog/archive/2008/11/05/watermarked-textbox-in-windows-forms-on-.net.aspx.
lately I needed a watermark textbox, the first thing that popped in to my head was OnLeave and OnEnter events of textbox, but first I googled it and I got two links first was the one in CodeProject which used the System.Drawing namespace and the other one was here using the SendMessage() over here http://vidmar.net/weblog/archive/2008/11/05/watermarked-textbox-in-windows-forms-on-.net.aspx.
我beleive的SendMessage函数则相对比较简单,它也有它自己没有闪烁。虽然我用它。
I beleive the SendMessage one is much easier and it also has no flickering in it. though I used it.
我希望这将是对你有所帮助。
I hope it will be helpful for you.