Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports Telerik.WinControls
- Imports Telerik.WinControls.UI
- Imports System.IO
- Public Class Form2
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- ThemeResolutionService.ApplicationThemeName = "Office2010Blue"
- End Sub
- Private Sub Buttonregister_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Buttonsignin.Click
- If (TextBoxpassword.Text = Nothing Or TextBoxusername.Text = Nothing) Then
- RadMessageBox.Show("All fields should be filled with proper information")
- Else
- Using reader As StreamReader = New StreamReader(My.Application.Info.DirectoryPath + "\" + TextBoxusername.Text)
- While Not reader.EndOfStream
- Dim username As String = reader.ReadLine()
- Dim password As String = reader.ReadLine()
- If username = TextBoxusername.Text And password = TextBoxpassword.Text Then
- RadMessageBox.Show("You have sucesfully signed in")
- Else
- RadMessageBox.Show("Invalid username or password")
- End If
- End While
- End Using
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement