Welcome to Katz - Pinoy Underground Forum

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?
  • Compact Safety Notice
  • Weekly Grants Lottery is live! Win a 20,000 ₪ jackpot — tickets are just 30 ₪, drawn every week. Buy your tickets »

need ko ng help about sa vbs code

R 0

Reborn1925

Transcendent
BANNED
Member
Banned
Joined
Apr 15, 2022
Messages
11
Reaction score
0
Points
1
Age
29
Location
Malabon City
grants
₲326
need help about vbs code
like ko sana gumawa ng apps para ma detect kung 100mbps at 1gbps ang lan speed status ko...
sana may maka tulong..
salamat
 
K 1.3M

KatzSec DevOps

Alpha and Omega
Staff member
Moderator
Philanthropist
Access
Moderating
Philanthropist
Access
Top Contributor
Community Legend
4 Year Silver Member 4y Silver
Joined
Jan 17, 2022
Messages
1,180,342
Reaction score
53,056
Points
113
grants
₲10,761
Reborn1925 Next time always upload your files sa https://dl.katz.to para siguradong di ma dedeadlink. *Please Disable your adblock when visiting katz.to to keep us running forever.
 
  • Like
Reactions: daniellapid19
D 158

DepRITiOnGuE

Transcendent
Member
Member
3 Year Silver Member 3y Silver
Joined
Mar 25, 2023
Messages
7
Reaction score
0
Points
1
Age
30
Location
Philippines
grants
₲192
Need mo pa ba 'to? Kung oo, eto code.

Basically yung ginagawa ng code ay ini-store niya sa array lahat ng adapters na registered sa computer mo.
Chine-check natin isa-isa kung yung adapter ay Ethernet na 100Mbps or GigabitEthernet na 1Gbps
Chine-check natin kung anong speed, ini-store natin siya sa 'speed' na variable for checking later via if statement.
Dito, may checking na tayo via if-else statement, kung yung speed value niya is 1000000000 bits (not bytes ha), kung oo, mag-message box na LAN speed ay 1Gbps. Kung hindi, edi yung 100 Mbps na message ipapalabas. Pwede mo yan i-replace as label kung trip mo, pero yan na yung code.

C#:
Dim adapters As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()

For Each adapter As NetworkInterface In adapters
    If adapter.NetworkInterfaceType = NetworkInterfaceType.Ethernet Or adapter.NetworkInterfaceType = NetworkInterfaceType.GigabitEthernet Then
        Dim speed As Long = adapter.Speed
        
        If speed >= 1000000000 Then
            MessageBox.Show("LAN speed is 1 Gbps")
        Else
            MessageBox.Show("LAN speed is 100 Mbps")
        End If
        
        Exit For
    End If
Next
 
Top Bottom