VB让文本框透明

来源:百度知道 编辑:UC知道 时间:2024/05/22 00:57:51
http://www.vbaccelerator.com/home/VB/Code/Libraries/Subclassing/Tile_a_Bitmap_Into_a_TextBox/article.asp大家帮忙整理一下这个网站的数据,由于小弟不懂外语,所以看不怎么懂,整理好了麻烦发到这里,这个老外好象能让文本框透明

好东东!可惜我e文也不太好...给你翻译一点:
先在左上角把类给下载了,然后,使用方法----

This sample presents a small class that allows you to tile a bitmap into the background of a TextBox. Note that the technique only works on multi-line text boxes, as the drawing of single-line TextBoxes is done in a different way and cannot be easily overridden in code.
这例子向你展示怎么用一个类给textbox贴上背景图片。要注意的是,这种方法只能用在多行文本框上。至于单行文本框,要用另外一种方法,并且不是那么容易用代码实现的。

......(中间省略无数行)

The cTextBoxBackground class
To make this easier to use, I've wrapped the code up in a simple class. This class has the following methods:
为了让用着方便些,我把代码都打包到一个简单的类里面了。这个类有下面这些方法:

Attach(ByVal hWndA As Long)
Attaches the class to the multi-line text box with the specified hWnd. Don't call this method until you've set up the background picture first.
让类与多行文本框连接(Attach),需指定hWnd。你必须先设置好背景图片,才能call这个方法。

Detach()
Detaches from the class so the text box painting goes back to norma