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. Simple Open File With... Question

Simple Open File With... Question

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

    I'm trying to open a file pragmatically with an application that is not the default and with out setting it as a default. For example: I have a myfile.bmp. My default photo viewer is Microsoft Fax Viewer, but I want to open it with Microsoft Paint with out setting Microsoft Paint as the new default. I've been playing with Process.Start("myfile.bmp") but can't seem to get anything to work. Any help would be appreciated Best Regards -Chris

    V B 2 Replies Last reply
    0
    • C cmarcus

      I'm trying to open a file pragmatically with an application that is not the default and with out setting it as a default. For example: I have a myfile.bmp. My default photo viewer is Microsoft Fax Viewer, but I want to open it with Microsoft Paint with out setting Microsoft Paint as the new default. I've been playing with Process.Start("myfile.bmp") but can't seem to get anything to work. Any help would be appreciated Best Regards -Chris

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      You can change file Associations by Shift Right Click. You get a OpenWith in whose target dialog a new association can be saved.

      Vasudevan Deepak Kumar Personal Homepage Tech Gossips

      1 Reply Last reply
      0
      • C cmarcus

        I'm trying to open a file pragmatically with an application that is not the default and with out setting it as a default. For example: I have a myfile.bmp. My default photo viewer is Microsoft Fax Viewer, but I want to open it with Microsoft Paint with out setting Microsoft Paint as the new default. I've been playing with Process.Start("myfile.bmp") but can't seem to get anything to work. Any help would be appreciated Best Regards -Chris

        B Offline
        B Offline
        blackjack2150
        wrote on last edited by
        #3

        It's done also with the Process.Start method but with an overload form of it. Basically you must start the application you desire(in your case mspaint.exe) and specify the name of the file you wish to open as a runtime parameter for mspaint.exe. I've done this once. If I find the code snippet, I'll post it later.

        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