Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[Source] Check if a process is running (Mutex) [NEW]

I have already posted this not the exactly the same just a few lines different.

https://hackforums.net/showthread.php?tid=584046
(Aug 21, 2010 05:57 AM)The-One Wrote:  To see if a program/process is running.

More specifically to prevent multiple launches of your program.
+1 for making them type out the code themselves and seemingly understanding what your doing.
(Aug 21, 2010 06:07 AM)Neroxan Wrote:  +1 for making them type out the code themselves and seemingly understanding what your doing.

+2 For me, because I am going to write a quick image reader =]
(Aug 21, 2010 06:05 AM)Vorfin Wrote:  More specifically to prevent multiple launches of your program.

That can also be done like this:

Code
If Ubound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName)) > 0 Then
  MessageBox.Show("Program is already running!")
  End
   End If
(Aug 21, 2010 06:11 AM)The-One Wrote:  0.o :P Well, I can only give you +1 :(

purchase uber to be able to +3 or give negative rep. Its how omni cons you into giving him another $15 :P But if you meant you can only +1 in return, ppl shouldent give rep expecting to get it back....

Rep is usually given for help in this section, if ppl know you arent a total skid, or if your a total skid and happen to leach something onto the forum that some other skid can use. Unfortunately, the last option seems to be the most common occurrence :/


also can be done something like
Code
If previous.instance(program name) = true then
end
end if

^^thats prolly not exact, im not a vb.net coder I just remember it off the top of my head.
(Aug 21, 2010 06:29 AM)The-One Wrote:  I don't need rep back from him, I just like to see how he 'asks' for rep :P

Vorfin, ask for rep? I lol'ed. Seriously.... See that staff tag up under his name bro? He wouldent make it that far if he "asks" or implies that he wanted rep...

Vorfin has more ppl hanging on his nuts than Britney Spears influences lil girls to be whores.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by gigajewMar 4, 2019 08:44 AM 15 1,600 Mar 4, 2019 08:44 AM
Last Post: Aristocles
[.NET] by Formula 1Mar 3, 2019 02:36 PM 6 225 Mar 3, 2019 02:36 PM
Last Post: Formula 1
[C#] by Iera NamhorunFeb 14, 2019 11:39 PM 10 414 Feb 14, 2019 11:39 PM
Last Post: Iera Namhorun