透明效果测试 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 asPopup1_Click(Cancel As Boolean) If Text1.BackColor = vbBlue Then Text1.BackColor = vbWhite Else Text1.BackColor = vbBlue End If End Sub Private Sub asPopup2_Click(Cancel As Boolean) If Me.BackColor = vbBlue Then Me.BackColor = vbWhite Else Me.BackColor = vbBlue End If End Sub Private Sub Form_Load() Text1.Width = Form1.Width Text1.Top = 0 Text1.Left = 0 asPopup2.Height = asPopup1.Height asPopup2.Width = asPopup1.Width asPopup2.Top = asPopup1.Top Text1.Text = Chr(13) + " QS-HJC " Me.BackColor = vbWhite 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
- 粉丝: 0
- 资源: 1
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助