title: How to get internet SSID and signal strength
body: <p>I'm using this code now, but it always pops up the cmd to retrieve SSID and signal strength, so I think there must be a another way to do this.</p>
  
  <p>If there is a way please let me know.</p>
  
  <pre><code>private void showConnectedID()
  {
      System.Diagnostics.Process p = new System.Diagnostics.Process();
      p.StartInfo.FileName = "netsh.exe";
      p.StartInfo.Arguments = "wlan show interfaces";
      p.StartInfo.UseShellExecute = false;
      p.StartInfo.RedirectStandardOutput = true;
  
      p.Start();
  
      try
      {
          string s = p.StandardOutput.ReadToEnd();
          string s1 = s.Substring(s.IndexOf("SSID"));
          s1 = s1.Substring(s1.IndexOf(":"));
          s1 = s1.Substring(2, s1.IndexOf("\n")).Trim();
  
          string s2 = s.Substring(s.IndexOf("Signal"));
          s2 = s2.Substring(s2.IndexOf(":"));
          s2 = s2.Substring(2, s2.IndexOf("\n")).Trim();
  
          label1.Text = s1;
          label4.Text = s2;
          p.WaitForExit();
      }
      catch
      {
          label1.Text = "Notconnected";
          label4.Text = "Notconnected";
      }    
  }
  </code></pre>
  
  <p>my program  picture
  <img src="https://i.stack.imgur.com/9bXoZ.png" alt="my program  picture">
  <a href="https://i.stack.imgur.com/FfXTk.png" rel="nofollow noreferrer">this is what happen when i turn it on</a></p>