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 can run a application when a file click such as pdf files that run acrobat reader ?

how can run a application when a file click such as pdf files that run acrobat reader ?

Scheduled Pinned Locked Moved C#
question
4 Posts 4 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.
  • B Offline
    B Offline
    B A
    wrote on last edited by
    #1

    hi . i create an application that in save operation , save with *.ddi extension. when a file with this extension (*.ddi) click in windows , want to run my application and show it. such as *.pdf files that when a user click it Acrobat reader run and show it. tanks.

    G J B 3 Replies Last reply
    0
    • B B A

      hi . i create an application that in save operation , save with *.ddi extension. when a file with this extension (*.ddi) click in windows , want to run my application and show it. such as *.pdf files that when a user click it Acrobat reader run and show it. tanks.

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      Have a look at "Registering the extension" part of this article: SlideShowBuilder[^]

      #region signature my articles #endregion

      1 Reply Last reply
      0
      • B B A

        hi . i create an application that in save operation , save with *.ddi extension. when a file with this extension (*.ddi) click in windows , want to run my application and show it. such as *.pdf files that when a user click it Acrobat reader run and show it. tanks.

        J Offline
        J Offline
        J a a n s
        wrote on last edited by
        #3

        Use the FileAssociation class from the link Mentalis[^]

        *jaans

        1 Reply Last reply
        0
        • B B A

          hi . i create an application that in save operation , save with *.ddi extension. when a file with this extension (*.ddi) click in windows , want to run my application and show it. such as *.pdf files that when a user click it Acrobat reader run and show it. tanks.

          B Offline
          B Offline
          BoneSoft
          wrote on last edited by
          #4

          You'll want to change the Main() method of Program.cs to Main(string[] args), and pass them along to your main Form constructor. And of course your main Form will need another constructor that accepts a string array. In that constructor you can look at the string array for file names, and do with them as you please. To register the file association, you can do that manually, or if you have an install project you can set up file associations there too.


          Try code model generation tools at BoneSoft.com.

          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