VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This code will put all the Shell icons into two image views for refrance, all from folder to my com

by DoctorMO (3 Submissions)
Category: Graphics
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Mon 2nd July 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This code will put all the Shell icons into two image views for refrance, all from folder to my computer.

Rate This code will put all the Shell icons into two image views for refrance, all from folder to my com



Dim ShellPath As String, ShellNo As Long

    For X = 0 To 39
        
        ShellPath = GetSettingString(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons", Trim(Str(X)), "")
        
        ShellNo = InStrEx(0, ShellPath, ",", 0, 1)
        
        If ShellNo <> 0 Then
            tmp1 = Val(Right$(ShellPath, Len(ShellPath) - ShellNo))
            ShellPath = Left$(ShellPath, ShellNo - 1)
            ShellNo = tmp1
        Else
            ShellNo = X
            ShellPath = GetSystemPath + "\Shell32.dll"
        End If
        
        Call ExtractIcon(PicBig, ShellPath, ShellNo, True, 32)
        Call ExtractIcon(PicSmall, ShellPath, ShellNo, False, 16)
        
        Call ShellBig.ListImages.Add(ShellBig.ListImages.Count + 1, , PicBig.Image)
        Call ShellSmall.ListImages.Add(ShellSmall.ListImages.Count + 1, , PicSmall.Image)
        
    Next X
End Function

Download this snippet    Add to My Saved Code

This code will put all the Shell icons into two image views for refrance, all from folder to my com Comments

No comments have been posted about This code will put all the Shell icons into two image views for refrance, all from folder to my com. Why not be the first to post a comment about This code will put all the Shell icons into two image views for refrance, all from folder to my com.

Post your comment

Subject:
Message:
0/1000 characters