PrevInstance

D

David de Passos

Hi!
There is my code:

Shared Function PrevInstance() As Boolean
If
Ubound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrent
Process.ProcessName)) > 0 Then
Return True
Else
Return False
End If
End Function

this dosn´t work in Windows 98 or Windows ME. How can I do to see if an
application is already running?

--


Cumprimentos,
David de Passos
--------------------------------------------------------------
RCSOFT, Lda.
E-Mail: (e-mail address removed)
Móvel: +351 966931639
Telefone: +351 239708708
Fax: +351 239708701
Tel. Directo: +351 239708705 ext. 401
 
K

Ken Tucker [MVP]

Hi,

You are better off using a mutex to tell if there is another
instance of the app running.

http://www.windowsformsdatagridhelp.info/?ID=59135549-e5dd-4501-9526-343ac05a7617

Ken
---------------------

Hi!
There is my code:

Shared Function PrevInstance() As Boolean
If
Ubound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrent
Process.ProcessName)) > 0 Then
Return True
Else
Return False
End If
End Function

this dosn´t work in Windows 98 or Windows ME. How can I do to see if an
application is already running?

--


Cumprimentos,
David de Passos
--------------------------------------------------------------
RCSOFT, Lda.
E-Mail: (e-mail address removed)
Móvel: +351 966931639
Telefone: +351 239708708
Fax: +351 239708701
Tel. Directo: +351 239708705 ext. 401
 
H

Herfried K. Wagner [MVP]

David de Passos said:
Shared Function PrevInstance() As Boolean
If
Ubound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrent
Process.ProcessName)) > 0 Then
Return True
Else
Return False
End If
End Function

this dosn´t work in Windows 98 or Windows ME. How can I do to see if an
application is already running?

Error message? 'Process' is based on performance counters, make sure
performance counters are enabled.
 

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

Similar Threads

Regional Settings 1
100 Labels 3
IP 1
Running Program 8
Query Timeout 3
TextBox 2
DataGrid Collumn/Cell Color 1
DataGrid 2 1

Top