Const GWL_EXSTYLE = (-20)
網(wǎng)站設(shè)計(jì)制作、網(wǎng)站設(shè)計(jì)服務(wù)團(tuán)隊(duì)是一支充滿(mǎn)著熱情的團(tuán)隊(duì),執(zhí)著、敏銳、追求更好,是創(chuàng)新互聯(lián)的標(biāo)準(zhǔn)與要求,同時(shí)竭誠(chéng)為客戶(hù)提供服務(wù)是我們的理念。成都創(chuàng)新互聯(lián)公司把每個(gè)網(wǎng)站當(dāng)做一個(gè)產(chǎn)品來(lái)開(kāi)發(fā),精雕細(xì)琢,追求一名工匠心中的細(xì)致,我們更用心!
Const WS_EX_LAYERED = H80000
Const WS_EX_TRANSPARENT As Integer= H20
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Integer, ByVal nIndex As Integer) As Integer
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Integer, ByVal nIndex As Integer, ByVal dwNewLong As Integer) As Integer
Private Sub Command1_Click()
SetWindowLong Me.hwnd, GWL_EXSTYLE, GetWindowLong(Me.hwnd, GWL_EXSTYLE) Or WS_EX_LAYERED Or WS_EX_TRANSPARENT
End Sub
'取消鼠標(biāo)穿透(一般窗體) SetWindowLong Me.hwnd, GWL_EXSTYLE, 0
'取消鼠標(biāo)穿透(UpdateLayeredWindow畫(huà)窗體) SetWindowLong Me.hwnd, GWL_EXSTYLE, WS_EX_LAYERED
將控件的背景色設(shè)為透明即可:
如Label1.BackColor=Color.
Transparent
當(dāng)然,還有別的方式可使底色透明,你自已琢磨一下。
那就讓Picture1控件的Enabled=false
說(shuō)實(shí)話(huà),看不太懂
或者直接讓Picture1控件不存在或者調(diào)節(jié)透明度