Class MainWindow Private Sub BtnLogIn_Click(sender As Object, e As RoutedEventArgs) Handles btnLogIn.Click Dim ds As New NEADataSet Dim dr As System.Data.DataRow Dim da As New NEADataSetTableAdapters.UsersTableAdapter Dim dt As System.Data.DataTable dt = ds.Tables("Users") da.fill(dt) For Each dr In dt.Rows If String.Compare(dr("Username"), txtUserName.Text) = 0 And String.Compare(dr("Password"), txtPassword.Text) = 0 Then If chkRememberMe.IsChecked = True Then Dim file As System.IO.StreamWriter file = My.Computer.FileSystem.OpenTextFileWriter("CheckedBox.txt", True) file.WriteLine("Checked") file.Close() Dim A = New Store() A.Show() Me.Close() Else Dim A = New Store() A.Show() Me.Close() End If GoTo LineBreak End If Next MsgBox("Your username or password is incorrect!", vbExclamation) LineBreak: ds.Dispose() End Sub Private Sub BtnSignUp_Click(sender As Object, e As RoutedEventArgs) Handles btnSignUp.Click Dim A = New Signup() A.show() Me.Close() End Sub ' Private Sub txtUserName_MouseEnter(sender As Object, e As MouseEventArgs) Handles txtUserName.MouseEnter ' If txtUserName.Text = "Username" Then ' txtUserName.Text = "" ' End If 'End Sub ' ' Private Sub txtUserName_MouseLeave(sender As Object, e As MouseEventArgs) Handles txtUserName.MouseLeave ' If txtUserName.Text = "" Then ' txtUserName.Text = "Username" 'End If 'End Sub ' Private Sub txtPassword_MouseEnter(sender As Object, e As MouseEventArgs) Handles txtPassword.MouseEnter ' If txtPassword.Text = "Password" Then ' txtPassword.Text = "" ' End If 'End Sub ' Private Sub txtPassword_MouseLeave(sender As Object, e As MouseEventArgs) Handles txtPassword.MouseLeave ' If txtPassword.Text = "" Then ' txtPassword.Text = "Password" 'End If ' End Sub End Class