Solved

Opening Files With Your Program

Posted on 2004-04-10
2
265 Views
Last Modified: 2010-05-02
I am making an audio player, and I don't want to have to go File >> Open every time I want to listen to a song.

Is there any way to make it so whenever you double click a program, or use 'Open With...' it will automatically start processing the file with the audio player?
0
Comment
Question by:momonja
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Accepted Solution

by:
appari earned 125 total points
ID: 10799549
first create file association so that your application gets executed when you double click on the file. for information on how to create file association go through this article http://vbnet.mvps.org/index.html?code/reg/association.htm

once your file association is created whenever you double click on a file your application gets executed and you can get the name of the file clicked by seeing the value in "command"

in your startup form's load event or sub main check the value of command, you will get the filename. use that value to open that file.
0
 

Author Comment

by:momonja
ID: 10799616
Thanks a ton!

I think it should be made clear though that to get the file name, all one has to do is:

dim i as string
i = command


For a while, I tried to do command1.value.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question