?
Solved

how to pass some file loaded by association?

Posted on 2002-04-09
6
Medium Priority
?
193 Views
Last Modified: 2012-05-04
Im making a program like winamp for my car that play mp3 files. And the question is: How can i pass the name of the file that I select in the Windows Explorer??

I can make the association in windows but always start a new copy of my program, the I use COMMAND to obtain the arguments (in this case the file name). But how can i program something like "Enqueue in Winamp" to my application??. The idea is that when I doble-clic in a file that name pass to my program to enqueue in my program??

thankx,
and sorry about my bad english
0
Comment
Question by:zucos
6 Comments
 

Author Comment

by:zucos
ID: 6929508
not starting another copy of my program.. just using the program currently opened.
0
 
LVL 1

Expert Comment

by:COAtheGREAT
ID: 6929608
set project type to ActiveX EXE
and start mode as Standalone

for the bigining :)
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6929618
In project/options change startup from "form1" to "Sub Main"

Sub Main()
    Dim OldTitle$

    If App.PrevInstance Then
        OldTitle = App.Title
        AppActivate OldTitle
        End
    End If

    Form1.Show
End Sub

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 32

Accepted Solution

by:
Brendt Hess earned 800 total points
ID: 6929633
Have your application look for a previous instance of your app already running.  If it finds one, pass the information to that app and terminate.

There is a sample app that does just that here:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=22061&lngWId=1

and here

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=28394&lngWId=1
0
 
LVL 3

Expert Comment

by:Bahnass
ID: 6929679

U can make a server-client application ie

1- U can compile Ur program as an activex exe (not standard exe) making a public proc in its class module (not a form ) this public proc  will get Ur string and pass it to the form this will be server app

2- then maka another small prog refering to the first one
(in project - references refer to Ur compiled exe)

3- inside client module call server module procedure
0
 

Author Comment

by:zucos
ID: 6929689
thankx to everyone.
the answer of bhess1 solve my problem.

thankx for answering that fast
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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

864 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