Tim TrottTim TrottWelcome to my site!

IP Address Informer – A Desktop Support Tool

By , Thursday 28th February 2013 in C#

IP Address Informer is an easy way to give your users a way to help IT support staff by providing them with the easiest IP Address lookup tool.

IP Address Informer is a simple system tray application that performs an IP address lookup for all LAN connections. IP Address Informer will show the current IP address of the users machine so that they can let IT support staff know the IP Address to connect to remotely through Remote Desktop or VNC. No more talking users through using ipconfig or navigating network properties to lookup IP address!

You can also use this tool to check IP address assigned to your computer and to find your IP address.

Using IP Address Informer is as easy as asking your users to place their mouse cursor over the thunderbolt icon on the bottom right hand side of the screen next to the clock! It will then popup a tooltip stating their local IP address on the internal LAN.
IP Address Lookup Tool
IP Address Lookup Tool

You can download IP Informer below, and the C# source code is listed below if you want to compile your own version. The complete source code and project files are included in the download.

Download IPInformer
Size: 45,028 bytes
Format: ZIP

 

 
IPInformer Setup
Size: 460,288 bytes
Format: MSI

 

IP Address Informer Source Code

The source code and Visual Studio project files are available to download free from the GitHub repository.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using System.Text;
 
namespace IPInformer
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new SysTrayApplication());
        }
    }
 
    public class SysTrayApplication : ApplicationContext
    {
        private NotifyIcon _trayIcon;
        private ContextMenuStrip _menu;
        private ToolStripMenuItem _exitMenu;
 
        public SysTrayApplication()
        {
            _trayIcon = new NotifyIcon();
            _trayIcon.Icon = IPInformer.Properties.Resources.icon;
            _trayIcon.Text = GetIPAddress();
            _trayIcon.Visible = true;
 
            _exitMenu = new ToolStripMenuItem("Exit");
            _exitMenu.Click += new EventHandler(ExitMenu_Click);
 
            _menu = new ContextMenuStrip();
            _menu.Items.Add(_exitMenu);
            _trayIcon.ContextMenuStrip = _menu;
 
            Application.ThreadExit += new EventHandler(Application_ThreadExit);
        }
 
        private void  Application_ThreadExit(object sender, EventArgs e)
        {
         _trayIcon.Visible = false;
        }
 
        private void ExitMenu_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
 
        private string GetIPAddress()
        {
            StringBuilder localIP = new StringBuilder();
            IPHostEntry host = Dns.GetHostEntry(Dns.GetHostName());
 
            foreach (IPAddress ip in host.AddressList)
            {
                if (ip.AddressFamily == AddressFamily.InterNetwork)
                {
                    localIP.AppendLine(ip.ToString());
                }
            }
 
            return localIP.ToString();
        }
    }
}

My website and its content are free to use without the clutter of adverts, tracking cookies, marketing messages or anything else like that. If you enjoyed reading this article, or it helped you in some way, all I ask in return is you leave a comment below or share this page with your friends. Thank you.

About the Author

Tim Trott

Tim is a professional software engineer, designer, photographer and astronomer from the United Kingdom. You can follow him on Twitter to get the latest updates.

Further Reading
3 thoughts on “IP Address Informer – A Desktop Support Tool”
  1. Gravatar
    mike pennington

    Tim, you still supporting this app?
    If so, could you make it show the Computer name as well ??

  2. Gravatar
    IT Guy

    This tool would make life a lot easier for dealing with our computer illiterate users.

    Do you know how I can deploy this to every desktop automatically? Then it would be perfect!

    Thanks for your effort!
     :) 

    1. Tim Trott
      Tim Trott

      Hello IT Guy

      I've created an MSI installer for IPInformer, and you should be able to deploy it using a group policy using the tutorial here

      Hope that helps

      Tim

Leave a Reply

Your email address will not be published.