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. Visual Basic
  4. Open file in its parent application

Open file in its parent application

Scheduled Pinned Locked Moved Visual Basic
csharplinuxhelp
4 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
    payal sheth
    wrote on last edited by
    #1

    hello all .... I want to open a file in its parent application In visual basic 6...i dont want to specify the exe path of the application...based on the file extension my application should search its parent application and open the file... In visual basic 6 Using Shell i tried... Like Shell("d:\windows\system32\notepad.exe d:\temp.txt" ) but in this i need to give the parent application path.i dont want to do that... in In Vb .net we have process.start(d:\temp.txt) this opens in the parent application... i want to do the same thing in Visual Basic 6.... Can any one help me out... Thanks in advance....

    D 1 Reply Last reply
    0
    • P payal sheth

      hello all .... I want to open a file in its parent application In visual basic 6...i dont want to specify the exe path of the application...based on the file extension my application should search its parent application and open the file... In visual basic 6 Using Shell i tried... Like Shell("d:\windows\system32\notepad.exe d:\temp.txt" ) but in this i need to give the parent application path.i dont want to do that... in In Vb .net we have process.start(d:\temp.txt) this opens in the parent application... i want to do the same thing in Visual Basic 6.... Can any one help me out... Thanks in advance....

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Did you try:

      Shell("D:\temp.txt")

      RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      P 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Did you try:

        Shell("D:\temp.txt")

        RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        P Offline
        P Offline
        payal sheth
        wrote on last edited by
        #3

        i tried shell("d:\temp.txt") it gives invalid procedure call error msg

        D 1 Reply Last reply
        0
        • P payal sheth

          i tried shell("d:\temp.txt") it gives invalid procedure call error msg

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          I seem to remember why that didn't work now. Try:

          Shell "CMD /C D:\\TEMP.TXT"
          

          RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          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