jorge Posted July 31, 2003 Posted July 31, 2003 Topic, I know it has been askt, but can't find it anymore :( Anyone? Thanx in advance Quote Jorge - http://www.blackdot.be/?page=apache.htm
*Experts* mutant Posted July 31, 2003 *Experts* Posted July 31, 2003 Dim mut As New Mutex(False, "Name of your app as it is on the title bar") If Not mut.WaitOne(0, false) Then 'your app is running already End if This should help you :) Quote
jorge Posted July 31, 2003 Author Posted July 31, 2003 Do i need to define "Mutex"? VB says:Type Mutext not defined?? Btw what if i don't have a form yet? Quote Jorge - http://www.blackdot.be/?page=apache.htm
*Experts* mutant Posted July 31, 2003 *Experts* Posted July 31, 2003 You can find Mutex in the Threading namespace. If you dont have a form just specify the name of your application as a whole, not the form. Like "WindowsApplication2". Quote
jorge Posted July 31, 2003 Author Posted July 31, 2003 Dim mut As New Threading.Mutex(False, "apachemon") If Not mut.WaitOne(0, False) Then MsgBox("ApacheMon is running") End If Will do nothing? apachemon <- is my exe and application name. Quote Jorge - http://www.blackdot.be/?page=apache.htm
Kurt Posted July 31, 2003 Posted July 31, 2003 http://www.xtremedotnettalk.com/showthread.php?s=&threadid=72989 Quote qrt
jorge Posted July 31, 2003 Author Posted July 31, 2003 Found it :D Needs to be the full exe name -> apachemon.exe as show in the taskmanager when looking at proccesses Quote Jorge - http://www.blackdot.be/?page=apache.htm
*Experts* mutant Posted July 31, 2003 *Experts* Posted July 31, 2003 It works for me without specifying the exe extension. All I used was the application name. Quote
jorge Posted July 31, 2003 Author Posted July 31, 2003 (edited) hmmz, Strage, it work, i recompiled it in release and it won't run anymore :( and if i compile it as debug -> the same :confused: Edited July 31, 2003 by jorge Quote Jorge - http://www.blackdot.be/?page=apache.htm
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.