Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes


Visual Basic Programming Code Examples

Visual Basic > Code Snippets Code Examples

Transparent form

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Transparent form Public Const GWL_EXSTYLE = (-20) Public Const WS_EX_TRANSPARENT = &H20& Public Const SWP_FRAMECHANGED = &H20 Public Const SWP_NOMOVE = &H2 Public Const SWP_NOSIZE = &H1 Public Const SWP_SHOWME = SWP_FRAMECHANGED Or _ SWP_NOMOVE Or SWP_NOSIZE Public Const HWND_NOTOPMOST = -2 Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long SetWindowLong Me.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT SetWindowPos Me.hwnd, HWND_NOTOPMOST, 0&, 0&, 0&, 0&, SWP_SHOWME