''투명을 위한 윈도우 API이며 이것은 그냥 어디 메모해둬야함.
''창을 투명하게 하여 최상단에 위치해도 클릭이 적용안되게 하는 API임
''그냥 그렇게 쓴다고 메모해두자 다시 쓸일이 있을라나??
Public NotInheritable Class WindowsServices
Private Sub New()
End Sub
Const WS_EX_TRANSPARENT As Integer = &H20
Const GWL_EXSTYLE As Integer = (-20)
<DllImport("user32.dll")> _
Private Shared Function GetWindowLong(ByVal hwnd As IntPtr, ByVal index As Integer) As Integer
End Function
<DllImport("user32.dll")> _
Private Shared Function SetWindowLong(ByVal hwnd As IntPtr, ByVal index As Integer, ByVal newStyle As Integer) As Integer
End Function
Public Shared Sub SetWindowExTransparent(ByVal hwnd As IntPtr)
Dim extendedStyle = GetWindowLong(hwnd, GWL_EXSTYLE)
SetWindowLong(hwnd, GWL_EXSTYLE, extendedStyle Or WS_EX_TRANSPARENT)
End Sub
End Class
사용예제------------------------------------------
'투명화 및 통과하기
Dim hwnd2 = .Handle ' 보조는 .을 찍엇 적용
WindowsServices.SetWindowExTransparent(hwnd2)
'VB.net' 카테고리의 다른 글
숫자만 입력 (0) | 2018.07.12 |
---|---|
숫자여부 체크 (0) | 2018.07.05 |
Windows 잠금화면 변경 (Win7 - 64bit OS 적용 확인) (0) | 2018.06.11 |
64Bit OS에서 32Bit App으로 레지 리디렉션 시키지 않고 쓰기 (0) | 2018.06.11 |
Windows-64bit에 system32폴더를 wow64 폴더로 Redirection 방지 (0) | 2018.06.08 |