code:Public Class form1 Private sub Ping() -code- End Sub Private sub Button_Click() Handles Button.Click Call Ping() End Sub