Question Add to fileName before the ".ico" extention

inkedgfx

Well-known member
Joined
Sep 29, 2012
Messages
139
Location
USA
Programming Experience
Beginner
I am creating a image to icon convertor and would like to add "32x32" before the extention . Im using a save dialog to save the converted file . is there a way to add "32x32" before the ".ico" extention in code?

thank you
InkedGFX
 
Hi,

Give this a try:-

VB.NET:
Dim strFileName As String = "c:\temp\TestIcon.ico"
 
strFileName = strFileName.Substring(0, strFileName.IndexOf(".")) & "_32x32" & strFileName.Substring(strFileName.IndexOf("."), strFileName.Length - strFileName.IndexOf("."))
MsgBox(strFileName)
Cheers,

Ian
 
Back
Top