|
-
Aug 16th, 2000, 08:06 AM
#1
Hello,
I need to make a form completely transparent.
for example, when you maximize it, you can only see the title bar,
I still need it to be there, but it just cant be visible.
thanks,
Dennis
-
Aug 16th, 2000, 08:07 AM
#2
I know I can find the DC of the desktop, then blit that onto my form, and it would look transparent but I would like to see if there is another way before I attemp that.
-
Aug 16th, 2000, 08:26 AM
#3
_______
<?>
Code:
'make a form transparent
'put this code in a bas module
Option Explicit
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
' <<<< Form Code >>>>
Option Explicit
'you must set the Form's [ShowInTaskbar to false]
'you must set the Form's [BorderStyle to none]
'
'
Private Sub Command1_Click()
SetWindowLong Me.hwnd, GWL_EXSTYLE, _
WS_EX_TRANSPARENT
SetWindowPos Me.hwnd, HWND_NOTOPMOST, _
0&, 0&, 0&, 0&, SWP_SHOWME
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Aug 16th, 2000, 08:33 AM
#4
Thank you very much!
this was exactly what I was looking for!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|