GetProcessesByName

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
 
J

JR

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top