Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to get program start directory after using FileDialog

How to get program start directory after using FileDialog

Scheduled Pinned Locked Moved C#
csharpwinformstutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Ramith Sivanarain
    wrote on last edited by
    #1

    :omg:Hi, I am new to C# and programming in Windows Forms. I use DataSet.ReadXml and DataSet.WriteXml and Save and OpenFileDialog to get the filename. I want to save and read some data from the path that the program starts. In my previous programming language I could easily get the path of the exe file, however Directory.GetCurrentDirectory returns the path that I most recently used in the FileDialog. Is there a Function that returns the path at start of the process (program) Thasnks Ramith Sivanarain

    J 1 Reply Last reply
    0
    • R Ramith Sivanarain

      :omg:Hi, I am new to C# and programming in Windows Forms. I use DataSet.ReadXml and DataSet.WriteXml and Save and OpenFileDialog to get the filename. I want to save and read some data from the path that the program starts. In my previous programming language I could easily get the path of the exe file, however Directory.GetCurrentDirectory returns the path that I most recently used in the FileDialog. Is there a Function that returns the path at start of the process (program) Thasnks Ramith Sivanarain

      J Offline
      J Offline
      jjansen
      wrote on last edited by
      #2

      Ramith Sivanarain wrote:

      Is there a Function that returns the path at start of the process (program)

      Try Application.StartupPath

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups