borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (How to know if Windows is going to restart or shutdown?)Next Topic (Command line arguments in VB?) New Topic New Poll Post Reply
AndreaVB Forum : API : Arguments for second instance of a program..
Poster Message
toughcoder
Level: Guest


icon Arguments for second instance of a program..

Greetings Every1,
My question here is a combination of my earlier 2 posts. Well I have an exe of my application running. Consider this example...

MyProg (that starts my application with no arguments)

Now if i type this in a run window

MyProg Arg1 (a second instance which is promptly closed by my first instance coz i used App.PrevInstance there to chk for multiple instances, what I want is my first instance should use the arguments Arg1 which my second instance passed). How can this b achieved. Any ideas...

06-10-2004 at 01:05 PM
| Quote Reply
GeoffS
Level: VB Lord


Registered: 29-09-2004
Posts: 536
icon Re: Arguments for second instance of a program..

Hi,
Just adapt the code I gave you - put it in the Command function that Steve gave you

If App.PrevInstance then
If x = Arg1 then
'Do what you want with the second instance
Else
End
End If   'x
End If   'App.PrevInstance



____________________________
multi-tasking - the ability to hang more than one app. at the same time.

06-10-2004 at 03:51 PM
View Profile Send Email to User Show All Posts | Quote Reply
toughcoder
Level: Guest

icon Re: Arguments for second instance of a program..

thanx geoffs, will give it a try

06-10-2004 at 07:47 PM
| Quote Reply
AndreaVB Forum : API : Arguments for second instance of a program..
Previous Topic (How to know if Windows is going to restart or shutdown?)Next Topic (Command line arguments in VB?) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder