Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8477999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:37:23+00:00 2026-06-10T18:37:23+00:00

In my program, I am attempting to get the WiFi strength value from the

  • 0

In my program, I am attempting to get the WiFi strength value from the system. When I get the value I need, I am trying to display it in a text box on a windows form. So far, I cannot get any sort of value to appear in the text box that I need. I need some insight on how I can achieve this. The call of the function that gets the raw rssi value is inside a timer loop.

*note this code for wifi strength was given by a contributor on this site. it is NOT my own.

 public static int GetSignalStrengthAsInt()
 {
     Int32 returnStrength = 0;
     ManagementObjectSearcher searcher = null;
     try
     {
         searcher = new ManagementObjectSearcher( 
              @"root\WMI", 
              @"select Ndis80211ReceivedSignalStrength  
                from  MSNdis_80211_ReceivedSignalStrength 
                where active=true" );

         // Call the get in order to populate the collection
         ManagementObjectCollection adapterObjects = searcher.Get();

         // Loop though the management object and pull out the signal strength
         foreach ( ManagementObject mo in adapterObjects )
         {
             returnStrength = Convert.ToInt32( 
                 mo["Ndis80211ReceivedSignalStrength"].ToString());
             break;
         }
      }
      catch (Exception)
      {
      }
      finally
      {
          if ( searcher != null )
          {
              searcher.Dispose();
          }
      }
      return returnStrength;            
 }

 //**********************PROBLEM AREA BELOW************************************
 void timer_Tick(object sender, EventArgs e) //not working
 {
     GetSignalStrengthAsInt();
     wifi.Text = returnStrength;  // unclear how to get returnStrength in wifi box
     ...
 }

The name of the textbox is ‘wifi’.
I think I am having some sort of scoping issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:37:25+00:00Added an answer on June 10, 2026 at 6:37 pm

    You need to use the return value of the function:

    wifi.Text = GetSignalStrengthAsInt().ToString();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been attempting to debug my program, but it always seems to get
I am attempting to create a simple program that will keep a text log
I get this error when attempting to debug my form, I cannot see where
I'm attempting to run mongrel_rails, but I get the following: the program can't start
what my program effectively is attempting to do is grab data from an xml
I'm attempting to use HSlogger to get some information about my program. So I
I am attempting to write a program that utilizes a ComboBox to display currently
I'm attempting to call a PHP script from a C++ program. For instance, here
I have a program attempting to use classes from the jakarta-poi-3.0.2.jar in my /usr/share/java
I am attempting to run a program that will find a new value for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.