Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm using c# forms this is supposed to return the process that's going on in the pc but for some reason, it only returns the

I'm using c# forms this is supposed to return the process that's going on in the pc but for some reason, it only returns the program that's running and nothing else. I found one that would work but the issue is that it's not really showing the change in real-time if that makes sense. I'm trying to make this one show when a process is running and then if I close one it will show that it was closed on the list

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Diagnostics; using System.Management; using System.Security.Principal; using System.Threading; using System.Windows.Forms;

namespace WindowsFormsApp6 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

private void Form1_Load(object sender, EventArgs e) { { Process currentProcess = Process.GetCurrentProcess(); listBox1.Items.Add(string.Format(@"{0} | ID: {1}", currentProcess.ProcessName, currentProcess.Id));

} } } }

image text in transcribed

Windows Foms App6|ID: 21796

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

More Books

Students also viewed these Databases questions