Imports System.Windows.Forms Public Class loginDialog1 Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click 'Me.DialogResult = System.Windows.Forms.DialogResult.OK 'Me.Close() If Encryptel(TextBox1.Text, 1) = TextBox2.Text Then Me.Hide() TextBox1.Text = "" TextBox2.Text = "" Printout.Show() Else MsgBox("Wrong Password", MsgBoxStyle.Information, "Lock") End If End Sub Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click Me.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.Close() End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim r As New Random TextBox2.Text = Environment.MachineName + Now TextBox2.Text = New String(TextBox2.Text.ToCharArray.OrderBy(Function(c) r.NextDouble).ToArray) TextBox2.Text = Encryptel(TextBox2.Text, 1) End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click TextBox2.SelectAll() Try If TextBox2.SelectedText = vbNullString Then Exit Sub Clipboard.SetText(TextBox2.SelectedText) Catch ex As Exception End Try End Sub Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click ' TextBox1.Text = Decryptel(TextBox2.Text, 1) End Sub Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click TextBox1.Text = Clipboard.GetText End Sub End Class