© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
44 replies
ensman38

✅ How can I change this code

public partial class Form1 : Form
    {
        string to be monitored="BITS";
        int sirano = 0;
        bool case;
        ServiceController service2;
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            int sn=0,active=0,passive=0;
            int i;


            //basic information of the computer is listed
            string computerName = Dns.GetHostName();
            label4.Text = computerName;
            string ipAddress = Dns.GetHostByName(computerName).AddressList[0].ToString();
            label3.Text = ipAddress;


            //services are listed as a grid. sec service number defines the number of active and passive services, and sirano defines the service to be monitored.
            dataGridView1.ColumnCount = 5;
            dataGridView1.Columns[0].Name = "No";
            dataGridView1.Columns[0].Width = 20;
            dataGridView1.Columns[1].Name = "Name";
            dataGridView1.Columns[2].Name = "Screen";
            dataGridView1.Columns[3].Name = "Type";
            dataGridView1.Columns[4].Name = "Active";

///**
                ///one. PART TO BE DONE AND CODED
                ///When there is a change in this section, one of the active programs on the computer
                ///First of all, the names and information of those who change the list will be listed in listbox1!!!
                ///Which program called SERVICE..!!!
                ///
                /// SECOND PART TO BE DONE
                ///In addition, it is requested to monitor IP packets and list external machine access during the transaction process.
                ///When there is a change, the accessed IP address and port information should be listed in listbox1.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

✅ how can i improve this code ?
C#CC# / help
2y ago
How can i fix this code
C#CC# / help
2y ago
✅ How can I improve this code?
C#CC# / help
4y ago