Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Dim Server1, Server2, User As Double
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Server1 = TextBox1.Text
- Server2 = TextBox2.Text
- If TextBox1.Text < TextBox2.Text Then
- TextBox1.Text = "01" + Server1
- TextBox3.Text = "Connected to Server1"
- End If
- If TextBox2.Text < TextBox1.Text Then
- TextBox2.Text = "01" + Server2
- TextBox3.Text = "Connected to Server2"
- ElseIf TextBox1.Text = TextBox2.Text Then
- TextBox1.Text = "01" + Server1
- TextBox3.Text = "Connected to Server1"
- End If
- End Sub
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
- If TextBox3.Text = " " Then
- MessageBox.Show("You aren't connect to a server!", "Error", MessageBoxButtons.OK)
- ElseIf TextBox3.Text = "Connected to Server1" Then
- TextBox1.Text = Server1 - "01"
- TextBox3.Text = " "
- End If
- If TextBox3.Text = "Connected to Server2" Then
- TextBox2.Text = Server2 - "01"
- TextBox3.Text = " "
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement