Hi ,
I have Extracted an Icon from an .exe
its displayed on a PictureBox after i want to save it i get an exception
invalid property value
Thanks !Code:Private Sub Command1_Click() Dim hIcon As Long Picture1.AutoRedraw = True hIcon = ExtractAssociatedIcon(App.hInstance, "C:\IconChan.exe", 0) DrawIcon Picture1.hdc, 0, 0, hIcon Picture1.Refresh SavePicture Picture1.Picture, "C:\Icon1.ico" End Sub Public Declare Function ExtractAssociatedIcon Lib "shell32.dll" Alias "ExtractAssociatedIconA" (ByVal hInst As Long, ByVal lpIconPath As String, lpiIcon As Long) As Long Public Declare Function DrawIcon Lib "user32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal hIcon As Long) As Long




Reply With Quote