Hello
I am trying to add to my application some icons via the code.
When i run my executable from debug / release compilation folder it works good .
But when I move my executable files to other folders it tells me that it doesn't find the icon files .
Any idea how/where I should tell the compiler to add those files to my final executable version ,that they will be visible .
my code looks like that
Private Sub Set_Application_Icon()
Dim Current As String
Dim Parent As DirectoryInfo
'current path is /bin/solution/
Current = Directory.GetCurrentDirectory()
Parent = Directory.GetParent(Current)
ChDir(Parent.FullName)
'/bin
Current = Directory.GetCurrentDirectory()
Parent = Directory.GetParent(Current)
ChDir(Parent.FullName)
'icons located at current directory now
#If WizardVersion = 0 And ViewerVersion = 0 Then
Me.Icon = New Icon(CurDir() & "\" & "LP_V2009c.ico")
#ElseIf WizardVersion = 0 And ViewerVersion = 1 Then
Me.Icon = New Icon(CurDir() & "\" & "LP_V2009v.ico")
#Else
Me.Icon = New Icon(CurDir() & "\" & "LP_V2009.ico")
#End If
End Sub
thanks a lot for help