Click here to Skip to main content
15,886,655 members
Articles / Programming Languages / Visual Basic

Windows 7 new features: Step by step in VB.NET and C#

Rate me:
Please Sign up or sign in to vote.
4.85/5 (88 votes)
31 Aug 2010CPOL9 min read 179.3K   4.7K   211  
Explaining all the new must have features in Windows 7 to make your application look shiny and professional, like the new features of the task bar and more.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.WindowsAPICodePack.Net;

namespace Win7NewFeatures.NetworkManagement
{
    public partial class frmNetworkInfo : Form
    {
        public frmNetworkInfo()
        {
            InitializeComponent();
        }

        private void frmNetworkInfo_Load(object sender, EventArgs e)
        {
            NetworkCollection networks = NetworkListManager.GetNetworks( NetworkConnectivityLevels.All);
            foreach (Network n in networks)
            {
                lstNetworks.Items.Add(n.NetworkId);
                
            }

        }

        private void lstNetworks_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lstNetworks.SelectedItem != null)
            {
                Guid NetworkID = new Guid(lstNetworks.SelectedItem.ToString());
                Network network = NetworkListManager.GetNetwork(NetworkID);
                txtName.Text = network.Name;
                txtDecription.Text = network.Description;
                txtDomainType.Text = network.DomainType.ToString();
                chkIsConnected.Checked = network.IsConnected;
                chInternet.Checked = network.IsConnectedToInternet;
                txtCategory.Text = network.Category.ToString();
                txtCreatedTime.Text = network.CreatedTime.ToString ();
                txtConnectedTime.Text = network.ConnectedTime.ToString();
                txtConnectivity.Text = network.Connectivity.ToString();
                NetworkConnectionCollection Connections = network.Connections ;

                foreach (NetworkConnection Connection in network.Connections ) 
                {
                    lstConnections.Items.Add("ConnectionID: " + Connection.ConnectionId );
                    lstConnections.Items.Add("Adapter ID:: " + Connection.AdapterId);
                }

            }


        }




    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer IDS
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions