RunTime problem

Hello All;

I want to load some images at runtime. So how can I specify the working folder and then point to that specific image. In other words i want to point my images folder as this:  Working directory/images/...
I have used some of System.Environment methos but no one help me.

Any suggesstion with a code snnipet would be truly appreciated.
Thanks.


Answer this question

RunTime problem

  • sparky62

    do you mean that you want to point to secific folder by code
    if this what you want you can use DirectoryInfo Class

  • Mehrdad Abdi

    If you want the current directory you can use:


    string current = Environment.CurrentDirectory;
     


    If you want the application folder (or the folder the executable is running from):


    string applicationFolder = Path.GetDirectoryName(Application.ExecutablePath);
     


  • RunTime problem