S
slonocode
I have created a filter in Eudora email program that will notify a
program when the criteria is met. For instance if the filter criteria
is met it will send the following command:
C:\MyProgam.exe "C:\MyFile.txt"
I have been able to process the command line by writing a small sub main
in a module and that works fine. But I need for their to be only 1
instance of the program. As it is now it opens a new instance of
MyProgram.exe every time the command line is called. So I need the
program to execute the first time the command line is called and then
just process any new command line calls and not open a new instance.
My module looks as follows:
Dim _filename As String
Public Sub Main(ByVal args() As String)
Dim s As String
For Each s In args
ParseArgs(s)
Next
Application.Run(New Form1)
End Sub
Public Sub ParseArgs(ByVal s As String)
MessageBox.Show(s)
_filename = s
End Sub
Public ReadOnly Property Filename() As String
Get
Return _filename
End Get
End Property
How can I do that?
program when the criteria is met. For instance if the filter criteria
is met it will send the following command:
C:\MyProgam.exe "C:\MyFile.txt"
I have been able to process the command line by writing a small sub main
in a module and that works fine. But I need for their to be only 1
instance of the program. As it is now it opens a new instance of
MyProgram.exe every time the command line is called. So I need the
program to execute the first time the command line is called and then
just process any new command line calls and not open a new instance.
My module looks as follows:
Dim _filename As String
Public Sub Main(ByVal args() As String)
Dim s As String
For Each s In args
ParseArgs(s)
Next
Application.Run(New Form1)
End Sub
Public Sub ParseArgs(ByVal s As String)
MessageBox.Show(s)
_filename = s
End Sub
Public ReadOnly Property Filename() As String
Get
Return _filename
End Get
End Property
How can I do that?