I am developing smart device application in C#. I am able to add the images in my application by sharing the folder. I am sharing the folder by doing some setting in the emulator. In the emulator by setting File -> Configure ->shared folder, I am able to retrive the images in my application by using Bitmap(). But I want to diplay these images from my application's folder. In my application I have added one folder by using add -> New Folder. In that I kept my images. But when I add them by using Bitmap I am getting error. How to add the images from application's local folder? Is there any way? If there is only one way as I above mentioned then can my application successfully display the images on different mobile devices after deploying the application on them ?
A:
Having a folder below your app is the right way to go.
How do you access it in code ? In a smart device, file paths do not have a drive at the beginning (like c:), so a path like c:\program files\app\images will not work.
You should get the location of your app by getting the current assembly (System.Reflection.Assembly.GetExecutingAssembly) and using the Location property to find your installation point, then appending your folder name to get to the images.
Timores
2010-03-04 09:36:08