> Hej NG
> > hvordan gør jeg min form gennemsigtig (Transparent)
> > jeg har kigget i MSDN men der kommer jo mange hit for en begynder. det
er
> > kun formen der skal være gennemsigtig.
>
> Nedenstående kode gor det, omend ikke altid lige godt. Men til en start..
>
>
>
> Private Const GWL_EXSTYLE = (-20)
> Private Const WS_EX_TRANSPARENT = &H20
> Private Const SWP_FRAMECHANGED = &H20
> Private Const SWP_NOMOVE = &H2
> Private Const SWP_NOSIZE = &H1
>
> Private Const SWP_SHOWME = SWP_FRAMECHANGED Or _
> SWP_NOMOVE Or SWP_NOSIZE
>
> Private Const HWND_NOTOPMOST = -2
>
> 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 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
>
> Private Sub cmdTrans_Click()
> Me.ShowInTaskbar = False
> Me.BorderStyle = 0
>
> '// Make the form transparent
> SetWindowLong Me.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT
>
> '// Put it on top
> SetWindowPos Me.hwnd, HWND_NOTOPMOST, 0&, 0&, 0&, 0&, SWP_SHOWME
>
> End Sub
>
jeg vil lige sige det er i vb6 jeg får en fejlmeddelse når jeg bruger
overstående kode
mvh Henrik C