I have this code, that worked on Windows 98 SE:
VB Code:
  1. Public Function MakeDC(inW As Long, inH As Long) As Long
  2. Dim lngDC As Long
  3.  
  4.     lngDC = CreateCompatibleDC(GetDC(GetDesktopWindow))
  5.     If lngDC < 1 Then
  6.         MakeDC = -1
  7.         Exit Function
  8.     End If
  9.     SelectObject lngDC, CreateCompatibleBitmap(GetDC(GetDesktopWindow), inW, inH)
  10.    
  11.     MakeDC = lngDC
  12. End Function
But now, 2 years later on Windows 2000 Professional, it doesn't. Any clues as to why? Pictures stored in the DC via. DrawIcon are never shown when the DC is blitted onto a picturebox's DC (which displays everything else fine).