Các chiêu thức trong lập trình Để form trở nên trong suốthome

1 317 0
Các chiêu thức trong lập trình Để form trở nên trong suốthome

Đang tải... (xem toàn văn)

Thông tin tài liệu

Để form trở nên trong suốt home Xuất xứ : www.allapi.net Binh khí sử dụng : Không Đoạn mã : Const LWA_COLORKEY = &H1 Const LWA_ALPHA = &H2 Const GWL_EXSTYLE = (-20) Const WS_EX_LAYERED = &H80000 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 Sub Form_Load() Dim Ret As Long Ret = GetWindowLong(Me.hWnd, GWL_EXSTYLE) Ret = Ret Or WS_EX_LAYERED SetWindowLong Me.hWnd, GWL_EXSTYLE, Ret SetLayeredWindowAttributes Me.hWnd, 0, 128, LWA_ALPHA End Sub ‘ Chú ý số 128 : Chính là số chỉ định độ trong suốt (Số này từ 0->255) . Để form trở nên trong suốt home Xuất xứ : www.allapi.net Binh khí sử dụng : Không Đoạn. crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long Private Sub Form_ Load() Dim Ret As Long Ret = GetWindowLong(Me.hWnd, GWL_EXSTYLE) Ret =

Ngày đăng: 24/10/2013, 15:20

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan