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 I do this?"open with"

How can I do this?"open with"

Scheduled Pinned Locked Moved C#
questionadobe
3 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.
  • H Offline
    H Offline
    hackerhcm
    wrote on last edited by
    #1

    I created a program which has a "Load Picture" button, and a Picture Box .Whenever I click a "Load Picture" button, it will show a Open File Dialog then selected file will load to a picture box. My question is How I can make the picture loads to my Picture Box when User right click on a image file ---> Open With --> browse for my program. Like Photoshop, you know, when you rigt click a image file ---> Open With ---> Photoshop --> then Photoshop will open with that image file. Thanks !

    M 1 Reply Last reply
    0
    • H hackerhcm

      I created a program which has a "Load Picture" button, and a Picture Box .Whenever I click a "Load Picture" button, it will show a Open File Dialog then selected file will load to a picture box. My question is How I can make the picture loads to my Picture Box when User right click on a image file ---> Open With --> browse for my program. Like Photoshop, you know, when you rigt click a image file ---> Open With ---> Photoshop --> then Photoshop will open with that image file. Thanks !

      M Offline
      M Offline
      mav northwind
      wrote on last edited by
      #2

      When Windows tries to open a file with your application, it's simply calling your executable with the file path as an argument. It's basically the same as dropping a file on your executable in a windows explorer window. So you just have to handle the arguments you get at startup in your Main method. Regards, mav -- Black holes are the places where god divided by 0...

      H 1 Reply Last reply
      0
      • M mav northwind

        When Windows tries to open a file with your application, it's simply calling your executable with the file path as an argument. It's basically the same as dropping a file on your executable in a windows explorer window. So you just have to handle the arguments you get at startup in your Main method. Regards, mav -- Black holes are the places where god divided by 0...

        H Offline
        H Offline
        hackerhcm
        wrote on last edited by
        #3

        thank you so much .....! I understood and tried it ! Worked perfectly ... ! :-D

        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