Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Opening Files With Your Program

Posted on 2004-04-10
2
Medium Priority
?
268 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 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

715 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