GetProcessesByName

  • Thread starter Thread starter JR
  • Start date Start date
J

JR

Hi I use this code from ms to detrerm if my prog is already running.

----------------------------------------------------------------

Function PrevInstance() As Boolean

Try

Return
(UBound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName))

Catch ex As Exception

Return False

End Try

End Function
 
Nobody have foundme an sollution?


JR said:
Hi I use this code from ms to detrerm if my prog is already running.

----------------------------------------------------------------

Function PrevInstance() As Boolean

Try

Return
(UBound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName))

Catch ex As Exception

Return False

End Try

End Function

--------------------------------------------------
When I run this program i get en exeption error from JIT becourse i don't
have some rights on that pc. How can I trap this error

Jan
 
Back
Top