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. Windows Forms
  4. How to load a document into an existing instance of an application via ShellExecute() ?

How to load a document into an existing instance of an application via ShellExecute() ?

Scheduled Pinned Locked Moved Windows Forms
questioncsharpc++comtutorial
3 Posts 3 Posters 14 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.
  • M Offline
    M Offline
    MatthiasBiel
    wrote on last edited by
    #1

    Hi, I'm writing an application supporting MDI. In http://www.codeproject.com/useritems/System\_File\_Association.asp is described how to associate the documents with my program. I'm still looking for a method to load additional documents into the application via double-clicking the respective file. With MFC this was done using DDE, but DDE doesn't seem to be supported well in .net. What is the standard way to achieve this in .net? TIA, Matthias

    K M 2 Replies Last reply
    0
    • M MatthiasBiel

      Hi, I'm writing an application supporting MDI. In http://www.codeproject.com/useritems/System\_File\_Association.asp is described how to associate the documents with my program. I'm still looking for a method to load additional documents into the application via double-clicking the respective file. With MFC this was done using DDE, but DDE doesn't seem to be supported well in .net. What is the standard way to achieve this in .net? TIA, Matthias

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      The closest thing to a ShellExecute is this code: System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.FileName = "yourfile"; p.StartInfo.UseShellExecute = trure; p.Start(); p.Close(); Hope that helps. Ben

      1 Reply Last reply
      0
      • M MatthiasBiel

        Hi, I'm writing an application supporting MDI. In http://www.codeproject.com/useritems/System\_File\_Association.asp is described how to associate the documents with my program. I'm still looking for a method to load additional documents into the application via double-clicking the respective file. With MFC this was done using DDE, but DDE doesn't seem to be supported well in .net. What is the standard way to achieve this in .net? TIA, Matthias

        M Offline
        M Offline
        Mike Dimmick
        wrote on last edited by
        #3

        See here[^] for an example. Note that you can always use the WM_COPYDATA message to pass an arbitrary block of data between processes, so the use of the registry is not necessary.

        Stability. What an interesting concept. -- Chris Maunder

        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