Open with...


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Open with...

  1. #1
    Join Date
    Feb 2004
    Location
    Colton, CA
    Posts
    550

    Open with...

    How do I code my program to allow use of 'Open With...'

    I've got a program which allows opening of .txt files, but the program has to bne running.

    I'd like the user to be able to pass the file to my program (which isn't running), then for the program to execute and open the file.

    EG.. when you click on a .TXT file in Windows Explorer, you can choose to open it with notepad, wordpad, word etc... When you choose one of these it loads the file into the selected program

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Feb 2004
    Location
    Colton, CA
    Posts
    550
    Phil,

    This only shows me how to create multiple associations. If I just send the file to my .EXE, will it automatically load it via OLE?

  4. #4
    Join Date
    Dec 2003
    Posts
    2,750
    You need to use the Command function in your application to retrieve the path to the file
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  5. #5
    Join Date
    Feb 2004
    Location
    Sydney, Australia
    Posts
    498

    Why not use ...

    As indicated in earlier reply, you should use the 'Command' info to see what has been passed. But why not use 'Send to' instead of 'Open with'? that way the user can choose what app to send the file to, even if it is a .txt that would default to Notepad on a dbl-clk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center