hola estoy aprendiendo a manejar este programa y tengo muchas dudas, estaba haciendo este prog de login y en la parte de registrarse funciona bien pero en la parte de buscar un usuario ya registrado no funciona correctamente. Me ayudaria mucho
si alguien lo revisa...
Public Class registrarse
Private Sub tabpage1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub crear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles crear.Click
End Sub
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 exist do nothing
Else
' if it does not. create it.
MkDir("C:\test\")
TextBox1.Text = " "
TextBox2.Text = " "
End If
If My.Computer.FileSystem.DirectoryExists("C:\test\" + TextBox1.Text) Then
'if the folder exist show an error
MsgBox("ERROR - Este usuario ya existe")
TextBox1.Text = " "
TextBox2.Text = " "
Else
'if the folder does not exists
MkDir("C:\test\" + TextBox1.Text)
Dim a As New System.IO.StreamWriter("C:\test\" + TextBox1.Text + TextBox2.Text)
a.WriteLine(TextBox1.Text)
a.Close()
TextBox1.Text = " "
TextBox2.Text = " "
End If
End Sub
Private Sub login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles login.Click
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If TextBox4.Text = " " Then
MsgBox("escriba un nombre")
TextBox3.Text = " "
TextBox4.Text = " "
Else
If My.Computer.FileSystem.DirectoryExists("C:\test\" + TextBox4.Text + TextBox4.Text) Then
'if the folder exist
MsgBox("Bienvenido")
TextBox3.Text = " "
TextBox4.Text = " "
Else
'if the folder does not exists
MsgBox("ERROR- el usuario no existe")
TextBox3.Text = " "
TextBox4.Text = " "
End If
End If
End Sub
Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged
End Sub
Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
End Sub
End Class