Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.22 KB | None | 0 0
  1. Imports Telerik.WinControls
  2. Imports Telerik.WinControls.UI
  3. Imports System.IO
  4.  
  5. Public Class Form1
  6.  
  7.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  8.         ThemeResolutionService.ApplicationThemeName = "Office2010Blue"
  9.     End Sub
  10.  
  11.     Private Sub Buttonregister_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Buttonregister.Click
  12.         If (TextBoxpassword.Text = Nothing Or TextBoxusername.Text = Nothing) Then
  13.             RadMessageBox.Show("All fields should be filled with proper information")
  14.         Else
  15.             Dim FileWriter As StreamWriter
  16.             FileWriter = New StreamWriter(My.Application.Info.DirectoryPath + "\" + TextBoxusername.Text, False)
  17.             FileWriter.Write(TextBoxusername.Text + vbCrLf + TextBoxpassword.Text)
  18.             FileWriter.Close()
  19.             RadMessageBox.Show("You have succesfully created an account" + vbCrLf + "Please Sign In now")
  20.             Form2.Show()
  21.             Me.Hide()
  22.         End If
  23.     End Sub
  24.  
  25.     Private Sub RadButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadButton1.Click
  26.         Form2.Show()
  27.         Me.Hide()
  28.     End Sub
  29. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement