ok i have these delcared at the top

VB Code:
  1. '/ api used to make the form invisible
  2. Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
  3. Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
  4. Private Declare Function SetLayeredWindowAttributes Lib "user32.dll" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
  5.  
  6. '/ constants for transparate form
  7. Const LWA_COLORKEY = &H1
  8. Const LWA_ALPHA = &H2
  9. Const GWL_EXSTYLE = (-20)

and this in the form_load event

VB Code:
  1. Dim Ret As Long
  2.     Dim clr As Long
  3.     Dim Ret1 As Long
  4.     Dim clr1 As Long
  5.  
  6.     Me.BackColor = vbRed
  7.     lstIP.BackColor = vbRed
  8.     clr = vbRed ' RGB(255, 0, 0) 'Color for Transparent part of form
  9.  
  10.     Ret = GetWindowLong(Me.hwnd, GWL_EXSTYLE)
  11.     Ret = Ret Or WS_EX_LAYERED
  12.    
  13.     SetWindowLong Me.hwnd, GWL_EXSTYLE, Ret
  14.     SetLayeredWindowAttributes Me.hwnd, clr, 128, LWA_COLORKEY
  15.  
  16.     SetWindowLong lstIP.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT

i have a picturebox as the form (the form itself is borderless so the picbackground is seen as the form).

now i have this listbox (lstip), i want to be able to make the listbox transparent enough to show the picbackground.

the problem is that instead of being transparent it becomes totally see through and shows things behind the form such as the desktop.

this is not the case if the form isnt made transparent.

i hope i am clear in my request.