VB中TEXTBOX可以设置成透明的 我记得是部件里添加一个什么来的,不记得了
添加后出来功能更强大的commandtextbox部件等等是添加哪个???不是啊直接在VB的部件里添加的我们老是讲过我忘记了~...
添加后出来功能更强大的command textbox部件 等等 是添加哪个???
不是啊 直接在VB的部件里添加的 我们老是讲过 我忘记了~ 展开
不是啊 直接在VB的部件里添加的 我们老是讲过 我忘记了~ 展开
4个回答
展开全部
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Private Const WS_EX_LAYERED = &H80000
Private Const GWL_EXSTYLE = (-20)
Private Const LWA_ALPHA = &H2
Private Const LWA_COLORKEY = &H1
Private Sub Form_Load()
Text1.BackColor = vbBlue
Dim rtn As Long
rtn = GetWindowLong(hwnd, GWL_EXSTYLE)
rtn = rtn Or WS_EX_LAYERED
SetWindowLong hwnd, GWL_EXSTYLE, rtn
SetLayeredWindowAttributes hwnd, vbBlue, 0, LWA_COLORKEY
End Sub
思路是让某一种颜色透明~将text背景色设置为这种颜色
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Private Const WS_EX_LAYERED = &H80000
Private Const GWL_EXSTYLE = (-20)
Private Const LWA_ALPHA = &H2
Private Const LWA_COLORKEY = &H1
Private Sub Form_Load()
Text1.BackColor = vbBlue
Dim rtn As Long
rtn = GetWindowLong(hwnd, GWL_EXSTYLE)
rtn = rtn Or WS_EX_LAYERED
SetWindowLong hwnd, GWL_EXSTYLE, rtn
SetLayeredWindowAttributes hwnd, vbBlue, 0, LWA_COLORKEY
End Sub
思路是让某一种颜色透明~将text背景色设置为这种颜色
展开全部
你说的这个好像是你机器安装了第三方控件
vb本身是不带这些东西的!~
vb本身是不带这些东西的!~
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你非要添加部件么 你在属性窗口里面可以做到的 把board sytel 改下就可以了啊1
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
二楼的透明不错呀,收藏一下
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询