Hey,
im using Sysyem.IO
to get the directory and add an image to the path wich is included in the project. However although all my project is located on my C:\ drive i.e. (documents/visualstudio/projects) whenever I execute the code for some reason strCPath always returns H:\\.Code:public uctrlFactors() { InitializeComponent(); //gets the current directory string strCPath = Directory.GetCurrentDirectory(); //adds that to the file name Uri ui = new Uri(strCPath + "\\Images\\busy.gif"); //sets the url of the webBrowser this.webBrowser1.Url = ui; }
Can anyone think of anyreason why this is happening in this project. I used the same code in a different project without a problem?





Reply With Quote