Results 1 to 3 of 3

Thread: auto launch vb program from associated file extension

  1. #1
    Dmichaelgeorge
    Guest

    auto launch vb program from associated file extension

    I created a VB program to view tif images. I've associated the "tif" extension in windows with this program. When a user doubl-clicks a "tif" file in explorer, how do I obtain the name of the file that was double-clicked so I know what to open?

    Thanks

  2. #2
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    I'm guessing it would be passed to the program as the command line;

    Try this in the startup of the program;

    If Command$<>"" then
    Msgbox "You double-clicked " & Command$
    end if

    .. you could then use Command$ throughout the program to load the .TIF file
    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

  3. #3
    Just make sure to parse it to make sure the file exists (it could have been from a DOS prompt), is even a valid filename, blah blah blah.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width