I have this code, that worked on Windows 98 SE: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).VB Code:
Public Function MakeDC(inW As Long, inH As Long) As Long Dim lngDC As Long lngDC = CreateCompatibleDC(GetDC(GetDesktopWindow)) If lngDC < 1 Then MakeDC = -1 Exit Function End If SelectObject lngDC, CreateCompatibleBitmap(GetDC(GetDesktopWindow), inW, inH) MakeDC = lngDC End Function


Reply With Quote