G
Guest
Hi,
I've some problem by getting files in my application path: I've to run the
following
instruction
MyButton.Image = Image.FromFile(MyImagePath));
MyImagePath should be the path where to find the image and I want to
instantiate it dinamically like this:
string MyImagePath = Path.GetFullPath("image.ico")
The result of MyImagePath is
"C:\test\MyApp\MyApp.Presentation\bin\Debug\image.ico" but it is NOT correct:
the file image.ico is in the following path
"C:\test\MyApp\MyApp.Presentation\image\image.ico".
Can anybody help me to find a solution? How can I get the correct path by
using a method like Path.GetFullPath()? I precise that it doesn't work this
solution:
string MyImagePath = Path.GetFullPath("..\..\image\image.ico")
because of the release version!!
Please help me, thenks
Siu
I've some problem by getting files in my application path: I've to run the
following
instruction
MyButton.Image = Image.FromFile(MyImagePath));
MyImagePath should be the path where to find the image and I want to
instantiate it dinamically like this:
string MyImagePath = Path.GetFullPath("image.ico")
The result of MyImagePath is
"C:\test\MyApp\MyApp.Presentation\bin\Debug\image.ico" but it is NOT correct:
the file image.ico is in the following path
"C:\test\MyApp\MyApp.Presentation\image\image.ico".
Can anybody help me to find a solution? How can I get the correct path by
using a method like Path.GetFullPath()? I precise that it doesn't work this
solution:
string MyImagePath = Path.GetFullPath("..\..\image\image.ico")
because of the release version!!
Please help me, thenks
Siu