Technology blog::Life hacks::Linux::Hardware::Gaming

IP Address Informer - A Desktop Support Tool

Get Your IP Address Information Here

By , 28th February 2013 in Windows

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 Informer
IP Informer

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.

IP Address Informer Source Code

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

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Windows.Forms;
  5. using System.Net;
  6. using System.Net.Sockets;
  7. using System.Text;
  8.  
  9. namespace IPInformer
  10. {
  11. static class Program
  12. {
  13. /// <summary>
  14. /// The main entry point for the application.
  15. /// </summary>
  16. [STAThread]
  17. static void Main()
  18. {
  19. Application.EnableVisualStyles();
  20. Application.SetCompatibleTextRenderingDefault(false);
  21. Application.Run(new SysTrayApplication());
  22. }
  23. }
  24.  
  25. public class SysTrayApplication : ApplicationContext
  26. {
  27. private NotifyIcon _trayIcon;
  28. private ContextMenuStrip _menu;
  29. private ToolStripMenuItem _exitMenu;
  30.  
  31. public SysTrayApplication()
  32. {
  33. _trayIcon = new NotifyIcon();
  34. _trayIcon.Icon = IPInformer.Properties.Resources.icon;
  35. _trayIcon.Text = GetIPAddress();
  36. _trayIcon.Visible = true;
  37.  
  38. _exitMenu = new ToolStripMenuItem("Exit");
  39. _exitMenu.Click += new EventHandler(ExitMenu_Click);
  40.  
  41. _menu = new ContextMenuStrip();
  42. _menu.Items.Add(_exitMenu);
  43. _trayIcon.ContextMenuStrip = _menu;
  44.  
  45. Application.ThreadExit += new EventHandler(Application_ThreadExit);
  46. }
  47.  
  48. private void Application_ThreadExit(object sender, EventArgs e)
  49. {
  50. _trayIcon.Visible = false;
  51. }
  52.  
  53. private void ExitMenu_Click(object sender, EventArgs e)
  54. {
  55. Application.Exit();
  56. }
  57.  
  58. private string GetIPAddress()
  59. {
  60. StringBuilder localIP = new StringBuilder();
  61. IPHostEntry host = Dns.GetHostEntry(Dns.GetHostName());
  62.  
  63. foreach (IPAddress ip in host.AddressList)
  64. {
  65. if (ip.AddressFamily == AddressFamily.InterNetwork)
  66. {
  67. localIP.AppendLine(ip.ToString());
  68. }
  69. }
  70.  
  71. return localIP.ToString();
  72. }
  73. }
  74. }
Further Reading
Comments
  1. mike pennington
    mike pennington

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

  2. IT Guy
    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.