v2.0.0 — Open Source

WLan Check Control

A .NET NuGet control to monitor WiFi, Ethernet and Internet connection status in real time within your WinForms applications.

.NET Framework 4.6.2+ .NET 8 .NET 9 C# Visual Basic NuGet
Download Demo Sample

Documentation

How to Run

Install the NuGet package and add the control to your form.

Download NuGet: NuGet WLanCheck

' Package Manager Install-Package WLanCheck -Version 2.0.0 ' .NET CLI dotnet add package WLanCheck --version 2.0.0
Supported Frameworks

.NET Framework 4.6.2+ .NET 8.0 .NET 9.0

What's New in v2.0.0

Multi-framework support — Now targets .NET Framework 4.6.2+, .NET 8 and .NET 9.

Real SSID detection — Displays the actual connected WiFi network SSID instead of the Windows profile name.

Real adapter detection — Shows the actual Ethernet adapter name and connection name instead of generic labels.

Memory leak fixes — Proper cleanup of native WLAN API handles. Fixed BackgroundWorker disposal issue.

Optimized P/Invoke — Reduced redundant native API calls for better performance.

GET / SET Value

Configure the control appearance and behavior:

Control
Scan = True ' When True, run the control EnableClickInfo = True ' When True, click opens connection info dialog
Colors
ColorEnabled = Color.Green ' Color when connected ColorDisabled = Color.WhiteSmoke ' Backcolor for off level wifi bars ColorDisconnect = Color.Red ' Color when no connection
Connection Info Dialog
BackColorHeading = Color.Gray ' Header background color TextColorHeading = Color.White ' Header text color BackColorSeparator = Color.Black ' Separator line color BackColorMain = Color.White ' Main area background color

GET Value (Read-Only)

InternetConnection : Boolean ' True if Internet is available LanAdaptater : String ' Actual adapter name (e.g. "Realtek PCIe GbE Family Controller") LanName : String ' Network SSID or connection name Statut : String ' AdHoc, Associating, Authenticating, Connected, Disconnected, Disconnecting, Discovering, NotReady TypeConnection : String ' "Ethernet" or "Wifi" WifiLevel : Integer ' Signal strength in % (0-100)

Init Custom Control

Add the custom control to your project and initialize:

Visual Basic
LanConnection1.ColorEnabled = Color.Green LanConnection1.ColorDisabled = Color.WhiteSmoke LanConnection1.ColorDisconnect = Color.Red LanConnection1.EnableClickInfo = True LanConnection1.Scan = True ' Start monitoring
C#
lanConnection1.ColorEnabled = Color.Green; lanConnection1.ColorDisabled = Color.WhiteSmoke; lanConnection1.ColorDisconnect = Color.Red; lanConnection1.EnableClickInfo = true; lanConnection1.Scan = true; // Start monitoring
Events
LANChanged(Value As String) ' Network name changed StatutChanged(Value As String) ' Connection status changed AdaptaterChanged(Value As String) ' Adapter changed InternetConnectionChanged(Value As String) ' Internet availability changed WifiLevelChanged(Value As Integer) ' Signal strength changed

Screenshots

Wifi Ok

WiFi Connected

Ethernet Connection

Ethernet Connection

No Connection

No Connection

Connection Informations

Connection Info

MIT License

Copyright (c) 2020 JYL Software

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.