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. Relative path

Relative path

Scheduled Pinned Locked Moved C#
csharpgraphics
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.
  • P Offline
    P Offline
    Parshant Verma
    wrote on last edited by
    #1

    Hi i am using a folder that contains png file i want to make this folder relative to my application. How can we do this btn_select_folder.BackgroundImage=System.Drawing.Image.FromFile(@"E:\GUI SkeltonButton\GUI Skelton\png1\002.png"); where should i place the png1 folder that need not give the full path in c# application

    A 1 Reply Last reply
    0
    • P Parshant Verma

      Hi i am using a folder that contains png file i want to make this folder relative to my application. How can we do this btn_select_folder.BackgroundImage=System.Drawing.Image.FromFile(@"E:\GUI SkeltonButton\GUI Skelton\png1\002.png"); where should i place the png1 folder that need not give the full path in c# application

      A Offline
      A Offline
      albCode
      wrote on last edited by
      #2

      Ur folder png1 set in same path where is ur EXE file and call path like this: btn_select_folder.BackgroundImage=System.Drawing.Image.FromFile(Application.StartupPath + @"\png1\002.png");

      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