Private Sub btnCreateUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreateUser.Click Dim namefile As String namefile = txtCUserName.Text If namefile = "" Then MsgBox("Please Enter A Username") txtCPassword.Focus() Else : If txtCPassword.Text = "" Then MsgBox("Please Enter A Password") Else : If My.Computer.FileSystem.DirectoryExists("C:\AccountUsers\") Then Else MkDir("C:\AccountUsers\") End If End If End If If My.Computer.FileSystem.FileExists("/txtCUserName.txt") <> True Then MsgBox("Account Already Exists, Use A Different Username Or Login", MsgBoxStyle.Information) txtCUserName.Text = "" txtCPassword.Text = "" txtCUserName.Focus() Else FileOpen(1, "C:\AccountUsers\" + namefile + ".txt", OpenMode.Output, OpenAccess.Write) PrintLine(1, txtCUserName.Text) PrintLine(1, txtCPassword.Text) FileClose(1) txtCUserName.Text = "" txtCPassword.Text = "" txtCUserName.Focus() End If End Sub
If My.Computer.FileSystem.FileExists("/txtCUserName.txt") Then ... else ... end if
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)