Solved

Opening Files With Your Program

Posted on 2004-04-10
2
266 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

623 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