is there a way to change the icon of an exe file? i have code to extract the icon below:
Dim myIconFile As String = "myIcon.ico"
Dim fs As New FileStream(myIconFile, FileMode.CreateNew)
Dim myIcon As Icon
myIcon = Icon.ExtractAssociatedIcon("C:\file1.exe")
Dim myIconImage As Bitmap = _
myIcon.ToBitmap
PictureBox1.Image = myIconImage
myIcon.Save(fs)
fs.Close()
so now i have the icon of "file1.exe" i have another file in that drive called "file2.exe" is there a way to replace file2.exe's icon with the icon i have extracted from file1.exe?
Dim myIconFile As String = "myIcon.ico"
Dim fs As New FileStream(myIconFile, FileMode.CreateNew)
Dim myIcon As Icon
myIcon = Icon.ExtractAssociatedIcon("C:\file1.exe")
Dim myIconImage As Bitmap = _
myIcon.ToBitmap
PictureBox1.Image = myIconImage
myIcon.Save(fs)
fs.Close()
so now i have the icon of "file1.exe" i have another file in that drive called "file2.exe" is there a way to replace file2.exe's icon with the icon i have extracted from file1.exe?