hoverctafter
Member
- Joined
- May 15, 2005
- Messages
- 9
- Programming Experience
- 10+
I am trying to develop an application that you can open documents with the current application (ie. using the openwith). These are just simple files that contain instructions for the program to know which server to join and a few other parameters. I am retrieving the file name with the following sub which is my start up module
Basically I want it to work like photoshop.. If you click a picture to edit with photoshop and you dont have photoshop open, then it opens it up. If photostop is open, then it opens the picture into photoshop.
TIA for any help
Hovercrafter
My question is how can I prevent another instance of my application from opening when I already have one openened. I would like if you select open with and the application is already opened, then it just send the file name to the already opened application and add it to the programs files list.
Public Sub Main(ByVal Args() As String) 'Add the startup call back
If Args.Length <> 0 Then
Dim i As Integer = 0
Do While i <> Environment.GetCommandLineArgs.GetUpperBound(0)
ArgFileName = ArgFileName & Args(i) & " "
i = i + 1
Loop
ArgFileName = Mid(ArgFileName, 1, ArgFileName.Length - 1)
End If
Application.Run(New frmMain)
End Sub
Basically I want it to work like photoshop.. If you click a picture to edit with photoshop and you dont have photoshop open, then it opens it up. If photostop is open, then it opens the picture into photoshop.
TIA for any help
Hovercrafter