Prevent Application from starting twice

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
I know this function will check to see if an instance is already running, in which you can check it...

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

But I was wondering if it was possible to have vb bring the already running application forward in windows and give it focus before I close the second app?
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
dat link looks very good, except i could barely make out what any of it was doing, i dont know anything about c++, but thanx for the attempt
 

waraque

New member
Joined
Jun 4, 2004
Messages
2
Text Book?

Hi everyone! I would like to know what text book you recomend for VB.NET. I do have Visual Basic.net Step by Step. This book is basically an intrucdution to VB.NET. I just took one visual basic class, and I realy enjoyed. I would like to know more about it. I will appreciate your recomendation.

Will
GBY
 

mzim

Well-known member
Joined
Jun 3, 2004
Messages
187
Location
Other side of the rock
Programming Experience
1-3
try this one... Programming Microsoft Visual Basic.NET
by Francesco Balena Wintellect Know how.

Core Reference
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
zweet, thanx fer the single instance link :)
 
Top Bottom