VB.Net 2003 - Detect Process Running?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: VB.Net 2003 - Detect Process Running?

  1. #1
    Join Date
    Oct 2004
    Posts
    14

    VB.Net 2003 - Detect Process Running?

    I'm working on a simple app to detect a process when running. Right now everything is running ok if the process is running, but if the process is not running my app will crash. I'm not sure how to validate if the process is not running to do nothing. Any suggestions? Thanks!

    Code:
        Private oPerf As New PerformanceCounter
        oPerf.CategoryName = "Process"
        oPerf.CounterName = "% Processor Time"
        oPerf.InstanceName = "PROCESSNAME"
        oPerf.BeginInit()
    
        Label1.Text = oPerf.NextValue.ToString()
    
        If Label1.Text > 0 ........

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Urgent for the expert in VB.NET 2003
    By almajhool in forum .NET
    Replies: 1
    Last Post: 10-01-2005, 04:27 PM
  2. Getting results from a Process in VB.NET
    By ecaslake in forum .NET
    Replies: 6
    Last Post: 04-20-2005, 11:23 AM
  3. Replies: 2
    Last Post: 08-27-2003, 11:11 AM
  4. Replies: 1
    Last Post: 09-26-2002, 08:00 AM
  5. Get Processor Usage for running Process
    By Warren in forum VB Classic
    Replies: 0
    Last Post: 08-16-2001, 10:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center