Process kill using System.Diagnostics

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
Mikael
Posts: 1
Joined: Wed Jul 08, 2015 3:09 am

Process kill using System.Diagnostics

Post by Mikael »

Hello,
I hope anyone can help with the following problem. First the code:

Code: Select all

    using System.Windows.Forms;
    using System;
	using System.Diagnostics;
    using System.Drawing;
    using Neo.ApplicationFramework.Tools;
    using Neo.ApplicationFramework.Common.Graphics.Logic;
    using Neo.ApplicationFramework.Controls;
    using Neo.ApplicationFramework.Interfaces;
    
    
    public partial class HTML_InfeedNip
    {	
		void HTML_InfeedNip_Closing(System.Object sender, System.ComponentModel.CancelEventArgs e)
		{
			string processName = "explorer";
			foreach (Process process in Process.GetProcessesByName(processName))
			process.Kill();
		}
    }
And the compiler error code is:

system.diagnostics.process' does not contain a definition for 'getprocessesbyname'

Thx in advance.

User avatar
Jae V
Posts: 118
Joined: Wed Jan 15, 2020 11:00 am

Re: Process kill using System.Diagnostics

Post by Jae V »

Hello,
We understand that this is a very old post. If there is anyone who is still experiencing this or similar issues and require assistance, please visit us at https://www.beijerelectronics.us/en-US/ ... ___support or give us call at 801.708.6690. Thank you.
Best regards,
Jason
(801) 708-6690
Technical Support
Contact Us



Beijer Electronics AB
http://www.beijerelectronics.us

Post Reply