1. Hey there, it looks like you haven't registered yet! Joining is free and we would love to have you as part of our community! Register / Login

Getting in to coding.

Discussion in 'Hellos and Goodbyes' started by 5piTFire, Mar 14, 2012.

  1. 5piTFire

    5piTFire

    Posts:
    798
    Me and some of my friends are working on a (Program) so I will be online but not in-game or playing in the servers. So if you see me online DO NOT DISTURB.
     
  2. Woody

    Woody Administrator Founder

    Posts:
    7,253

    Inventory:

    lol okay?

    You coding... lol
     
  3. 5piTFire

    5piTFire

    Posts:
    798
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If My.Computer.FileSystem.DirectoryExists("C:\Test\") Then
    'if the folder exists do nothing
    Else
    'if it does not, Creat it.
    MkDir("C:\Test\")
    End If
    If My.Computer.FileSystem.DirectoryExists("C\Test\" + TextBox1.Text) Then
    'If the folder exists show an error
    MsgBox("Error - Account already exists")
    Else
    'if the folder does not exists
    MkDir("C:\Test\" + TextBox1.Text)

    Dim a As New System.IO.StreamWriter("C:\Test\" + TextBox1.Text + "\Username.txt")
    a.WriteLine(TextBox1.Text)
    a.Close()

    Dim b As New System.IO.StreamWriter("C:\Test\" + TextBox1.Text + "\Password.txt")
    b.WriteLine(TextBox2.Text)
    b.Close()
    End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    Try
    Dim sa As String
    Dim sb As String

    Dim a As New System.IO.StreamReader("C:\Test\" + TextBox3.Text + "\Username.txt")
    sa = a.readline()
    a.Close()

    Dim b As New System.IO.StreamReader("C:\Test\" + TextBox3.Text + "\Password.txt")
    sb = b.ReadLine()
    b.Close()

    If TextBox3.Text = sa.ToString Then
    'do this
    If TextBox4.Text = sb.ToString Then
    'do this
    MsgBox("Welcome to the system - " + sa.ToString)
    End If
    Else
    'if its not equal give an error
    MsgBox("Error account does not exist")
    End If
    Catch ex As Exception
    MsgBox("Error - " + ex.Message)
    End Try
    End Sub
    End Class

    50 mins later :D im going to bed!!
     
  4. 5piTFire

    5piTFire

    Posts:
    798
  5. Charlie Boy

    Charlie Boy Member

    Posts:
    374
    I used to do stuff like that in dos 3.1 when i was like 12, It was easy with dos to make your own cheats for games.
     
  6. Charlie Boy

    Charlie Boy Member

    Posts:
    374
    O and you got syntax errors in there.
     
  7. 5piTFire

    5piTFire

    Posts:
    798
    Yeah I did that last night and fix them this morning :D
     

Share This Page