I'm making a program and in one of the part of the program there is this button and for it to do main function it needs to check if the notepad is running. So how can i check if the process is running?
emreozpalamutcu
0
Junior Poster in Training
Recommended Answers
Jump to PostIf you're using Windows...
Research some Windows API functions. If memory serves me, you'll want to enumerate the processes then it may be required that you get the path to the executable.
Jump to PostYou can use the Windows API with C++/CLI normally, unless you intend to consume functions/classes that are purely native code with other .NET languages, in which case you will need a managed wrapper around the pure native functions/classes to use them with other .NET languages.
If your project will …
Jump to PostAs for solving the problem, my idea is to enumerate the running processes, and search for ones named "notepad", and ones with a path to the executable that point to the location of "notepad.exe", and if required (normally it probably would be, otherwise this faulty mechanism for detecting if notepad …
Jump to PostOh ok, so did you use the "Process" class to start the process?
Process Class: http://msdn.microsoft.com/en-us/library/ccf1tfx0.aspx
Jump to PostNow you've confused me, would you please clarify if your application starts the process or not?
All 26 Replies
pseudorandom21
166
Practically a Posting Shark
emreozpalamutcu
0
Junior Poster in Training
pseudorandom21
166
Practically a Posting Shark
emreozpalamutcu
0
Junior Poster in Training
pseudorandom21
166
Practically a Posting Shark
emreozpalamutcu
0
Junior Poster in Training
pseudorandom21
166
Practically a Posting Shark
emreozpalamutcu
0
Junior Poster in Training
emreozpalamutcu
0
Junior Poster in Training
pseudorandom21
166
Practically a Posting Shark
pseudorandom21
166
Practically a Posting Shark
emreozpalamutcu
0
Junior Poster in Training
emreozpalamutcu
0
Junior Poster in Training
pseudorandom21
166
Practically a Posting Shark
emreozpalamutcu
0
Junior Poster in Training
pseudorandom21
166
Practically a Posting Shark
emreozpalamutcu
0
Junior Poster in Training
emreozpalamutcu
0
Junior Poster in Training
emreozpalamutcu
0
Junior Poster in Training
emreozpalamutcu
0
Junior Poster in Training
emreozpalamutcu
0
Junior Poster in Training
emreozpalamutcu
0
Junior Poster in Training
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
emreozpalamutcu
0
Junior Poster in Training
triumphost
120
Posting Whiz
cool_zephyr
7
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.