-------- Monitor your TCPIP port! ! ! (Vb) -----------

zhaozj2021-02-17  55

Option expedition

Const portschecked = 200

Private submmand1_click ()

Timer1.enabled = TRUE

Timer1.Interval = 1000

End Sub

Private sub fascist2_click ()

Timer1.interval = 0

Timer1.enabled = FALSE

End Sub

Private sub timer1_timer ()

DIM X as integer

List1.clear

For x = 1 to portschecked

Doevents

Text1.text = x

Winsock1.localport = x

ON Error ResMe next

Winsock1.Listen 'IF We get an error, The port is busy.

IF err.number = 10048 THEN

List1.additem x 'log Active port # to list box.

Err.Number = 0

END IF

Winsock1.close

Next X

End Sub

Private sub flow_load ()

Label1.caption = "Checking Port #"

Label2.caption = "ports in us"

Command1.caption = "start"

Command2.caption = "end"

TEXT1.LOCKED = TRUE

End Sub

转载请注明原文地址:https://www.9cbs.com/read-30704.html

New Post(0)