窗体透明代码
chengd222吧
全部回复
仅看楼主
level 15
一楼防抽
2011年10月09日 01点10分 1
level 15
晕,代码不让发[拍砖]
2011年10月09日 01点10分 4
level 3
.......ding
2011年10月09日 05点10分 5
level 15
Option Explicit
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_COLORKEY = &H1
----------------------------------------
Private Sub Form_Load()
  Me.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
2011年10月12日 08点10分 6
好使
2013年06月08日 03点06分
能不能加上注释[乖]
2013年06月08日 03点06分
level 1
很好!学习!
2011年10月22日 14点10分 7
level 4
这些看不懂!
向您请教一个简单的问题:
Private Sub Form_Load()
Print "天天向上"
End Sub
'加载事件为什么不能输出?
2011年11月30日 11点11分 8
level 15
Private Sub Form_Load()
Me.AutoRedraw = True
Print "天天向上"
End Sub
2011年11月30日 22点11分 9
autoredraw是做啥的?
2013年05月25日 05点05分
level 4
谢谢!解决了。
2011年12月01日 04点12分 10
1