Sistem Pengolahan Data Penduduk Pada Kelurahan Wek I Padang Sidempuan

  User < Global .Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _

  Private components As System.ComponentModel.IContainer

  System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,

  Me .Label4.AutoSize = True Me .Label4.Font = New System.Drawing.Font( "Verdana" , 8.25!,

  ' 'Label4 '

  Private Sub InitializeComponent() Me .Label4 = New System.Windows.Forms.Label Me .Label5 = New System.Windows.Forms.Label Me .TextBox1 = New System.Windows.Forms.TextBox Me .TextBox2 = New System.Windows.Forms.TextBox Me .Label7 = New System.Windows.Forms.Label Me .Label8 = New System.Windows.Forms.Label Me .Button1 = New System.Windows.Forms.Button Me .Button2 = New System.Windows.Forms.Button Me .Button3 = New System.Windows.Forms.Button Me .ListView1 = New System.Windows.Forms.ListView Me .ColumnHeader1 = New System.Windows.Forms.ColumnHeader Me .ColumnHeader2 = New System.Windows.Forms.ColumnHeader Me .ColumnHeader3 = New System.Windows.Forms.ColumnHeader Me .Button4 = New System.Windows.Forms.Button Me .SuspendLayout()

  <System.Diagnostics.DebuggerStepThrough()> _

  'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor.

  'Required by the Windows Form Designer

  Partial Class FormPengguna Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list.

  End Sub

  MyBase .Dispose(disposing) End Try

  End If Finally

  components.Dispose()

  If disposing AndAlso components IsNot Nothing Then

  Protected Overrides Sub Dispose( ByVal disposing As Boolean ) Try

  <System.Diagnostics.DebuggerNonUserCode()> _

  CType (0, Byte )) Me .Label4.Location = New System.Drawing.Point(38, 22) Me .Label4.Name = "Label4" Me .Label4.Size = New System.Drawing.Size(70, 13) Me .Label4.TabIndex = 3 Me .Label4.Text = "Nama User"

  ' 'Label5 '

  CType (0, Byte )) Me .TextBox2.Location = New System.Drawing.Point(146, 47) Me .TextBox2.Name = "TextBox2" Me .TextBox2.Size = New System.Drawing.Size(150, 21) Me .TextBox2.TabIndex = 7

  System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,

  Me .Label8.AutoSize = True Me .Label8.Font = New System.Drawing.Font( "Verdana" , 8.25!,

  ' 'Label8 '

  CType (0, Byte )) Me .Label7.Location = New System.Drawing.Point(130, 22) Me .Label7.Name = "Label7" Me .Label7.Size = New System.Drawing.Size(12, 13) Me .Label7.TabIndex = 9 Me .Label7.Text = ":"

  System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,

  Me .Label7.AutoSize = True Me .Label7.Font = New System.Drawing.Font( "Verdana" , 8.25!,

  ' 'Label7 '

  System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,

  Me .Label5.AutoSize = True Me .Label5.Font = New System.Drawing.Font( "Verdana" , 8.25!,

  Me .TextBox2.Font = New System.Drawing.Font( "Verdana" , 8.25!,

  ' 'TextBox2 '

  CType (0, Byte )) Me .TextBox1.Location = New System.Drawing.Point(146, 19) Me .TextBox1.Name = "TextBox1" Me .TextBox1.Size = New System.Drawing.Size(150, 21) Me .TextBox1.TabIndex = 6

  System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,

  Me .TextBox1.Font = New System.Drawing.Font( "Verdana" , 8.25!,

  ' 'TextBox1 '

  CType (0, Byte )) Me .Label5.Location = New System.Drawing.Point(38, 54) Me .Label5.Name = "Label5" Me .Label5.Size = New System.Drawing.Size(61, 13) Me .Label5.TabIndex = 4 Me .Label5.Text = "Password"

  System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,

  CType (0, Byte )) Me .Label8.Location = New System.Drawing.Point(130, 50) Me .Label8.Name = "Label8" Me .Label8.Size = New System.Drawing.Size(12, 13)

  Me .Label8.TabIndex = 10 Me .Label8.Text = ":"

  Me .Button3.Font = New System.Drawing.Font( "Verdana" , 8.25!,

  System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,

  Me .ColumnHeader3}) Me .ListView1.Font = New System.Drawing.Font( "Verdana" , 8.25!,

  System.Windows.Forms.ColumnHeader() { Me .ColumnHeader1, Me .ColumnHeader2,

  Me .ListView1.Columns.AddRange( New

  ' 'ListView1 '

  CType (0, Byte )) Me .Button3.Location = New System.Drawing.Point(278, 88) Me .Button3.Name = "Button3" Me .Button3.Size = New System.Drawing.Size(65, 30) Me .Button3.TabIndex = 14 Me .Button3.Text = "KELUAR" Me .Button3.UseVisualStyleBackColor = True

  System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,

  ' 'Button3 '

  ' 'Button1 '

  CType (0, Byte )) Me .Button2.Location = New System.Drawing.Point(146, 88) Me .Button2.Name = "Button2" Me .Button2.Size = New System.Drawing.Size(65, 30) Me .Button2.TabIndex = 13 Me .Button2.Text = "HAPUS" Me .Button2.UseVisualStyleBackColor = True

  System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,

  Me .Button2.Font = New System.Drawing.Font( "Verdana" , 8.25!,

  ' 'Button2 '

  CType (0, Byte )) Me .Button1.Location = New System.Drawing.Point(12, 88) Me .Button1.Name = "Button1" Me .Button1.Size = New System.Drawing.Size(65, 30) Me .Button1.TabIndex = 12 Me .Button1.Text = "SIMPAN" Me .Button1.UseVisualStyleBackColor = True

  System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,

  Me .Button1.Font = New System.Drawing.Font( "Verdana" , 8.25!,

  CType (0, Byte )) Me .ListView1.FullRowSelect = True Me .ListView1.GridLines = True Me .ListView1.Location = New System.Drawing.Point(12, 136) Me .ListView1.Name = "ListView1" Me .ListView1.Size = New System.Drawing.Size(312, 125) Me .ListView1.TabIndex = 46 Me .ListView1.UseCompatibleStateImageBehavior = False

  Me .ListView1.View = System.Windows.Forms.View.Details

  ' 'ColumnHeader1 '

  Me .ColumnHeader1.Text = "No" Me .ColumnHeader1.Width = 30

  ' 'ColumnHeader2 '

  Me .ColumnHeader2.Text = "User Name" Me .ColumnHeader2.Width = 100

  ' 'ColumnHeader3 '

  Me .ColumnHeader3.Text = "Password" Me .ColumnHeader3.Width = 160

  ' 'Button4 '

  Me .Button4.Font = New System.Drawing.Font( "Verdana" , 8.25!,

  System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,

  CType (0, Byte )) Me .Button4.Location = New System.Drawing.Point(79, 88) Me .Button4.Name = "Button4" Me .Button4.Size = New System.Drawing.Size(65, 30) Me .Button4.TabIndex = 47 Me .Button4.Text = "UBAH" Me .Button4.UseVisualStyleBackColor = True

  ' 'FormPengguna '

  Me .AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me .AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me .BackColor = System.Drawing.SystemColors.ActiveCaption Me .ClientSize = New System.Drawing.Size(356, 271) Me .Controls.Add( Me .Button4) Me .Controls.Add( Me .ListView1) Me .Controls.Add( Me .Button3) Me .Controls.Add( Me .Button2) Me .Controls.Add( Me .Button1) Me .Controls.Add( Me .Label8) Me .Controls.Add( Me .Label7) Me .Controls.Add( Me .TextBox2) Me .Controls.Add( Me .TextBox1) Me .Controls.Add( Me .Label5) Me .Controls.Add( Me .Label4) Me .Name = "FormPengguna" Me .StartPosition =

  System.Windows.Forms.FormStartPosition.CenterScreen

  Me .Text = " DATA PENGGUNA" Me .ResumeLayout( False ) Me .PerformLayout()

  End Sub

  Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents ListView1 As System.Windows.Forms.ListView Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader2 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader3 As System.Windows.Forms.ColumnHeader Friend WithEvents Button4 As System.Windows.Forms.Button

  Dim No As Integer = 0 Try

  End While End Using

  No = No + 1 ListItem = New ListViewItem() ListItem = ListView1.Items.Add(No) ListItem.SubItems.Add(IIf(IsDBNull(Data( "UserName" )) = True , "-" , Data( "UserName" ))) ListItem.SubItems.Add(IIf(IsDBNull(Data( "Password" )) = True , "-" , Format(Data( "Password" ), "*****" )))

  Dim ListItem As ListViewItem While Data.Read

  ListView1.Items.Clear()

  Using Data As MySqlDataReader = Cmd.ExecuteReader

  TablePengguna" , Koneksi) Koneksi.Open()

  Using Koneksi As New MySqlConnection(cn) Using Cmd As New MySqlCommand( "Select * From

  End Sub Private Sub Tampildata()

  End Class Imports MySql.Data.MySqlClient Public Class FormPengguna

  Catch ex As Exception End Try

  End Using End Using

  Values ('" & TextBox1.Text & "', '" & TextBox2.Text & "' )" , koneksi) cmd1.ExecuteNonQuery()

  Using cmd1 = New MySqlCommand( "Insert Into TablePengguna

  koneksi.Open()

  Using koneksi As New MySqlConnection(cn)

  Private Sub SimpanUser() Try

  End Using End Using Catch ex As Exception

  MsgBox(ex.Message())

  End Try End Sub Private Sub FormPengguna_Load( ByVal sender As System.Object, ByVal e

  As System.EventArgs) Handles MyBase .Load

  Tampildata()

  End Sub Private Sub bersih()

  TextBox1.Text = "" TextBox2.Text = "" TextBox1.Focus()

  End Sub Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As

  System.EventArgs) Handles Button1.Click

  Try Using Koneksi As New MySqlConnection(cn)

  Using Cmd As New MySqlCommand( "Select * From

  TablePengguna Where UserName='" & TextBox1.Text & "'" , Koneksi) Koneksi.Open()

  Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read = True Then

  MsgBox( "Data Pengguna Sudah Terdaftar Sebelumnya" , MsgBoxStyle.Critical, "Warning New User" ) bersih() TextBox1.Focus()

  Else

  SimpanUser() bersih() MsgBox( "Data User Sudah Berhasil Di Simpan" , MsgBoxStyle.Information, "Pesan Simpan Jurusan" ) TextBox1.Focus()

  End If End Using

  End Using End Using

  Tampildata()

  Catch ex As Exception

  MsgBox(ex.Message())

  End Try End Sub Private Sub Button4_Click( ByVal sender As System.Object, ByVal e As

  System.EventArgs) Handles Button4.Click

  Dim Msg As DialogResult Dim Sql As String = "Update tablepENGGUNA Set " & _

  "Username='" & TextBox1.Text & "', " & _ "Password='" & TextBox2.Text & "' Where UserName='" & TextBox1.Text & "'" Msg = MessageBox.Show( "Yakin Mengedit Data Jurusan " & _ vbCrLf & "Dengan User " & TextBox1.Text & "..??" , _

  "Konfirmasi Edit" , MessageBoxButtons.YesNo, _ MessageBoxIcon.Question, _ MessageBoxDefaultButton.Button2)

  Try Using conn As New MySqlConnection(cn)

  conn.Open()

  Using cmd = New MySqlCommand(Sql, conn) If (Msg = DialogResult.Yes) Then

  Using results = cmd.ExecuteReader End Using

  MsgBox( "Data Sudah Berhasi DiUbah" , MsgBoxStyle.Information, "Pesan Data" ) bersih() TextBox1.Focus()

  Else

  bersih() TextBox1.Focus()

  End If End Using

  End Using

  Tampildata()

  Catch ex As OleDb.OleDbException

  MsgBox( "Failed : " & ex.Message)

  End Try

  Tampildata()

  End Sub Private Sub ListView1_DoubleClick( ByVal sender As Object , ByVal e As

  System.EventArgs) Handles ListView1.DoubleClick

  Try

  TextBox1.Text =

  IIf(IsDBNull(ListView1.SelectedItems(0).SubItems(1).Text.ToString) =

  True , "" , ListView1.SelectedItems(0).SubItems(1).Text.ToString) Using Koneksi As New MySqlConnection(cn)

  Using Cmd As New MySqlCommand( "Select * From

  TablePengguna WHERE UserName='" & ListView1.SelectedItems(0).SubItems(1).Text & "'" , Koneksi) Koneksi.Open()

  Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

  TextBox2.Text = Data( "Password" )

  End If End Using

  End Using End Using

  Catch ex As Exception

  MsgBox(ex.Message())

  End Try End Sub Private Sub ListView1_SelectedIndexChanged( ByVal sender As

  System.Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged

  End Sub Private Sub Button2_Click( ByVal sender As System.Object, ByVal e As

  System.EventArgs) Handles Button2.Click

  Dim Msg As DialogResult Dim Sql As String = "Delete From Tablepengguna " & _

  "WHERE UserName='" & TextBox1.Text & "'" Msg = MessageBox.Show( "Yakin Menghapus Data User " & _ vbCrLf & "Dengan UserName " & TextBox1.Text & "..??" , _

  "Konfirmasi Hapus" , MessageBoxButtons.YesNo, _ MessageBoxIcon.Question, _ MessageBoxDefaultButton.Button2)

  Try Using conn As New MySqlConnection(cn)

  conn.Open()

  Using cmd = New MySqlCommand(Sql, conn) If (Msg = DialogResult.Yes) Then

  Using results = cmd.ExecuteReader End Using

  MsgBox( "Data Sudah Berhasi DiHapus" , MsgBoxStyle.Information, "Pesan Data" ) bersih() TextBox1.Focus()

  Else

  bersih() TextBox1.Focus()

  End If End Using

  End Using

  Tampildata()

  Catch ex As OleDb.OleDbException

  MsgBox( "Failed : " & ex.Message)

  End Try

  Tampildata()

  End Sub Private Sub Button3_Click( ByVal sender As System.Object, ByVal e As

  System.EventArgs) Handles Button3.Click Close()

  End Sub Private Sub TextBox2_TextChanged( ByVal sender As System.Object, ByVal

  e As System.EventArgs) Handles TextBox2.TextChanged

  End Sub Private Sub Button5_Click( ByVal sender As System.Object, ByVal e As

  System.EventArgs)

  End Sub End Class

  < Global .Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _

  Partial Class Form2 Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list.

  <System.Diagnostics.DebuggerNonUserCode()> _

  Protected Overrides Sub Dispose( ByVal disposing As Boolean ) Try

  If disposing AndAlso components IsNot Nothing Then

  components.Dispose()

  End If Finally

  MyBase .Dispose(disposing) End Try

  End Sub

  'Required by the Windows Form Designer

  Private components As System.ComponentModel.IContainer

  'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor.

  <System.Diagnostics.DebuggerStepThrough()> _

  Private Sub InitializeComponent() Me .Label1 = New System.Windows.Forms.Label Me .TextBox1 = New System.Windows.Forms.TextBox Me .TextBox2 = New System.Windows.Forms.TextBox Me .Label2 = New System.Windows.Forms.Label Me .TextBox3 = New System.Windows.Forms.TextBox Me .Label3 = New System.Windows.Forms.Label Me .Label4 = New System.Windows.Forms.Label Me .DateTimePicker1 = New System.Windows.Forms.DateTimePicker Me .Label5 = New System.Windows.Forms.Label Me .ComboBox1 = New System.Windows.Forms.ComboBox Me .TextBox4 = New System.Windows.Forms.TextBox Me .Label6 = New System.Windows.Forms.Label Me .ComboBox2 = New System.Windows.Forms.ComboBox Me .Label7 = New System.Windows.Forms.Label Me .ComboBox3 = New System.Windows.Forms.ComboBox Me .Label8 = New System.Windows.Forms.Label Me .TextBox5 = New System.Windows.Forms.TextBox Me .Label9 = New System.Windows.Forms.Label Me .TextBox6 = New System.Windows.Forms.TextBox Me .Label10 = New System.Windows.Forms.Label Me .DateTimePicker2 = New System.Windows.Forms.DateTimePicker Me .Label11 = New System.Windows.Forms.Label Me .Button1 = New System.Windows.Forms.Button Me .TextBox7 = New System.Windows.Forms.TextBox Me .DateTimePicker3 = New System.Windows.Forms.DateTimePicker Me .Button2 = New System.Windows.Forms.Button

  Me .ComboBox4 = New System.Windows.Forms.ComboBox Me .Label12 = New System.Windows.Forms.Label Me .TextBox8 = New System.Windows.Forms.TextBox Me .Label13 = New System.Windows.Forms.Label Me .SuspendLayout()

  ' 'Label1 '

  Me .Label1.AutoSize = True Me .Label1.Location = New System.Drawing.Point(12, 18) Me .Label1.Name = "Label1" Me .Label1.Size = New System.Drawing.Size(28, 13) Me .Label1.TabIndex = 0 Me .Label1.Text = "NIK"

  ' 'TextBox1 '

  Me .TextBox1.Location = New System.Drawing.Point(175, 15) Me .TextBox1.Name = "TextBox1" Me .TextBox1.Size = New System.Drawing.Size(116, 21) Me .TextBox1.TabIndex = 1

  ' 'TextBox2 '

  Me .TextBox2.Location = New System.Drawing.Point(175, 41) Me .TextBox2.Name = "TextBox2" Me .TextBox2.Size = New System.Drawing.Size(116, 21) Me .TextBox2.TabIndex = 3

  ' 'Label2 '

  Me .Label2.AutoSize = True Me .Label2.Location = New System.Drawing.Point(12, 44) Me .Label2.Name = "Label2" Me .Label2.Size = New System.Drawing.Size(40, 13) Me .Label2.TabIndex = 2 Me .Label2.Text = "NAMA"

  ' 'TextBox3 '

  Me .TextBox3.Location = New System.Drawing.Point(175, 67) Me .TextBox3.Multiline = True Me .TextBox3.Name = "TextBox3" Me .TextBox3.Size = New System.Drawing.Size(171, 20) Me .TextBox3.TabIndex = 5

  ' 'Label3 '

  Me .Label3.AutoSize = True Me .Label3.Location = New System.Drawing.Point(12, 70) Me .Label3.Name = "Label3" Me .Label3.Size = New System.Drawing.Size(91, 13) Me .Label3.TabIndex = 4 Me .Label3.Text = "TEMPAT LAHIR"

  ' 'Label4 '

  Me .Label4.AutoSize = True Me .Label4.Location = New System.Drawing.Point(12, 96) Me .Label4.Name = "Label4" Me .Label4.Size = New System.Drawing.Size(72, 13) Me .Label4.TabIndex = 6 Me .Label4.Text = "TGL. LAHIR"

  ' 'DateTimePicker1 '

  Me .DateTimePicker1.Format =

  System.Windows.Forms.DateTimePickerFormat.[Short]

  Me .DateTimePicker1.Location = New System.Drawing.Point(175, 96) Me .DateTimePicker1.Name = "DateTimePicker1" Me .DateTimePicker1.Size = New System.Drawing.Size(98, 21) Me .DateTimePicker1.TabIndex = 7

  ' 'Label5 '

  Me .Label5.AutoSize = True Me .Label5.Location = New System.Drawing.Point(12, 125) Me .Label5.Name = "Label5" Me .Label5.Size = New System.Drawing.Size(95, 13) Me .Label5.TabIndex = 8 Me .Label5.Text = "JENIS KELAMIN"

  ' 'ComboBox1 '

  Me .ComboBox1.FormattingEnabled = True Me .ComboBox1.Items.AddRange( New Object () { "LAKI-LAKI" ,

  "PEREMPUAN" })

  Me .ComboBox1.Location = New System.Drawing.Point(175, 122) Me .ComboBox1.Name = "ComboBox1" Me .ComboBox1.Size = New System.Drawing.Size(98, 21) Me .ComboBox1.TabIndex = 9

  ' 'TextBox4 '

  Me .TextBox4.Location = New System.Drawing.Point(175, 149) Me .TextBox4.Multiline = True Me .TextBox4.Name = "TextBox4" Me .TextBox4.Size = New System.Drawing.Size(171, 20) Me .TextBox4.TabIndex = 11

  ' 'Label6 '

  Me .Label6.AutoSize = True Me .Label6.Location = New System.Drawing.Point(12, 152) Me .Label6.Name = "Label6" Me .Label6.Size = New System.Drawing.Size(53, 13) Me .Label6.TabIndex = 10 Me .Label6.Text = "ALAMAT"

  ' 'ComboBox2 '

  Me .ComboBox2.FormattingEnabled = True Me .ComboBox2.Items.AddRange( New Object () { "ISLAM" , "KATOLIK" ,

  "PROTESTAN" , "HINDU" , "BUDHA" })

  Me .ComboBox2.Location = New System.Drawing.Point(175, 202) Me .ComboBox2.Name = "ComboBox2" Me .ComboBox2.Size = New System.Drawing.Size(98, 21) Me .ComboBox2.TabIndex = 13

  ' 'Label7 '

  Me .Label7.AutoSize = True Me .Label7.Location = New System.Drawing.Point(12, 205) Me .Label7.Name = "Label7" Me .Label7.Size = New System.Drawing.Size(49, 13) Me .Label7.TabIndex = 12 Me .Label7.Text = "AGAMA"

  ' 'ComboBox3 '

  Me .ComboBox3.FormattingEnabled = True Me .ComboBox3.Items.AddRange( New Object () { "KAWIN" , "BELUM

  KAWIN" })

  Me .ComboBox3.Location = New System.Drawing.Point(175, 229) Me .ComboBox3.Name = "ComboBox3" Me .ComboBox3.Size = New System.Drawing.Size(98, 21) Me .ComboBox3.TabIndex = 15

  ' 'Label8 '

  Me .Label8.AutoSize = True Me .Label8.Location = New System.Drawing.Point(12, 232) Me .Label8.Name = "Label8" Me .Label8.Size = New System.Drawing.Size(135, 13) Me .Label8.TabIndex = 14 Me .Label8.Text = "STATUS PERKAWINAN"

  ' 'TextBox5 '

  Me .TextBox5.Location = New System.Drawing.Point(175, 283) Me .TextBox5.Multiline = True Me .TextBox5.Name = "TextBox5" Me .TextBox5.Size = New System.Drawing.Size(171, 20) Me .TextBox5.TabIndex = 17

  ' 'Label9 '

  Me .Label9.AutoSize = True Me .Label9.Location = New System.Drawing.Point(12, 286) Me .Label9.Name = "Label9" Me .Label9.Size = New System.Drawing.Size(73, 13) Me .Label9.TabIndex = 16

  Me .Label9.Text = "PEKERJAAN"

  ' 'TextBox6 '

  Me .TextBox6.Location = New System.Drawing.Point(175, 309) Me .TextBox6.Multiline = True Me .TextBox6.Name = "TextBox6" Me .TextBox6.Size = New System.Drawing.Size(171, 20) Me .TextBox6.TabIndex = 19

  ' 'Label10 '

  Me .Label10.AutoSize = True Me .Label10.Location = New System.Drawing.Point(12, 312) Me .Label10.Name = "Label10" Me .Label10.Size = New System.Drawing.Size(134, 13) Me .Label10.TabIndex = 18 Me .Label10.Text = "KEWARGA NEGARAAN"

  ' 'DateTimePicker2 '

  Me .DateTimePicker2.Format =

  System.Windows.Forms.DateTimePickerFormat.[Short]

  Me .DateTimePicker2.Location = New System.Drawing.Point(178, 335) Me .DateTimePicker2.Name = "DateTimePicker2" Me .DateTimePicker2.Size = New System.Drawing.Size(98, 21) Me .DateTimePicker2.TabIndex = 21

  ' 'Label11 '

  Me .Label11.AutoSize = True Me .Label11.Location = New System.Drawing.Point(12, 341) Me .Label11.Name = "Label11" Me .Label11.Size = New System.Drawing.Size(111, 13) Me .Label11.TabIndex = 20 Me .Label11.Text = "BERLAKU HINGGA"

  ' 'Button1 '

  Me .Button1.Location = New System.Drawing.Point(15, 381) Me .Button1.Name = "Button1" Me .Button1.Size = New System.Drawing.Size(87, 23) Me .Button1.TabIndex = 22 Me .Button1.Text = "SIMPAN" Me .Button1.UseVisualStyleBackColor = True

  ' 'TextBox7 '

  Me .TextBox7.Location = New System.Drawing.Point(265, 381) Me .TextBox7.Multiline = True Me .TextBox7.Name = "TextBox7" Me .TextBox7.Size = New System.Drawing.Size(37, 20) Me .TextBox7.TabIndex = 23 Me .TextBox7.Text = "Aktip"

  Me .TextBox7.Visible = False Me .TextBox7.WordWrap = False

  "ISTRI" , "ANGGOTA" })

  ' 'Label13 '

  Me .TextBox8.Location = New System.Drawing.Point(175, 175) Me .TextBox8.Name = "TextBox8" Me .TextBox8.Size = New System.Drawing.Size(146, 21) Me .TextBox8.TabIndex = 28

  ' 'TextBox8 '

  Me .Label12.AutoSize = True Me .Label12.Location = New System.Drawing.Point(12, 258) Me .Label12.Name = "Label12" Me .Label12.Size = New System.Drawing.Size(119, 13) Me .Label12.TabIndex = 26 Me .Label12.Text = "STATUS KELUARGA"

  ' 'Label12 '

  Me .ComboBox4.Location = New System.Drawing.Point(175, 255) Me .ComboBox4.Name = "ComboBox4" Me .ComboBox4.Size = New System.Drawing.Size(98, 21) Me .ComboBox4.TabIndex = 27

  Me .ComboBox4.FormattingEnabled = True Me .ComboBox4.Items.AddRange( New Object () { "KEPALA KELUARGA" ,

  ' 'DateTimePicker3 '

  ' 'ComboBox4 '

  Me .Button2.Location = New System.Drawing.Point(108, 381) Me .Button2.Name = "Button2" Me .Button2.Size = New System.Drawing.Size(87, 23) Me .Button2.TabIndex = 25 Me .Button2.Text = "HAPUS" Me .Button2.UseVisualStyleBackColor = True

  ' 'Button2 '

  Me .DateTimePicker3.Location = New System.Drawing.Point(234, 358) Me .DateTimePicker3.Name = "DateTimePicker3" Me .DateTimePicker3.Size = New System.Drawing.Size(17, 21) Me .DateTimePicker3.TabIndex = 24 Me .DateTimePicker3.Visible = False

  System.Windows.Forms.DateTimePickerFormat.[Short]

  Me .DateTimePicker3.Format =

  Me .Label13.AutoSize = True Me .Label13.Location = New System.Drawing.Point(12, 178) Me .Label13.Name = "Label13" Me .Label13.Size = New System.Drawing.Size(76, 13)

  Me .Label13.TabIndex = 29 Me .Label13.Text = "KELURAHAN"

  ' 'Form2 '

  Me .AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 13.0!) Me .AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me .BackColor = System.Drawing.SystemColors.ActiveCaption Me .ClientSize = New System.Drawing.Size(360, 415) Me .Controls.Add( Me .Label13) Me .Controls.Add( Me .TextBox8) Me .Controls.Add( Me .ComboBox4) Me .Controls.Add( Me .Label12) Me .Controls.Add( Me .Button2) Me .Controls.Add( Me .DateTimePicker3) Me .Controls.Add( Me .TextBox7) Me .Controls.Add( Me .Button1) Me .Controls.Add( Me .DateTimePicker2) Me .Controls.Add( Me .Label11) Me .Controls.Add( Me .TextBox6) Me .Controls.Add( Me .Label10) Me .Controls.Add( Me .TextBox5) Me .Controls.Add( Me .Label9) Me .Controls.Add( Me .ComboBox3) Me .Controls.Add( Me .Label8) Me .Controls.Add( Me .ComboBox2) Me .Controls.Add( Me .Label7) Me .Controls.Add( Me .TextBox4) Me .Controls.Add( Me .Label6) Me .Controls.Add( Me .ComboBox1) Me .Controls.Add( Me .Label5) Me .Controls.Add( Me .DateTimePicker1) Me .Controls.Add( Me .Label4) Me .Controls.Add( Me .TextBox3) Me .Controls.Add( Me .Label3) Me .Controls.Add( Me .TextBox2) Me .Controls.Add( Me .Label2) Me .Controls.Add( Me .TextBox1) Me .Controls.Add( Me .Label1) Me .Font = New System.Drawing.Font( "Verdana" , 8.25!,

  System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,

  CType (0, Byte )) Me .FormBorderStyle =

  System.Windows.Forms.FormBorderStyle.FixedToolWindow

  Me .Name = "Form2" Me .StartPosition =

  System.Windows.Forms.FormStartPosition.CenterScreen

  Me .Text = "INPUT DATA PENDUDUK" Me .ResumeLayout( False ) Me .PerformLayout()

  End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox

  Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents DateTimePicker1 As

  System.Windows.Forms.DateTimePicker

  Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox Friend WithEvents TextBox4 As System.Windows.Forms.TextBox Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents ComboBox2 As System.Windows.Forms.ComboBox Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents ComboBox3 As System.Windows.Forms.ComboBox Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents TextBox5 As System.Windows.Forms.TextBox Friend WithEvents Label9 As System.Windows.Forms.Label Friend WithEvents TextBox6 As System.Windows.Forms.TextBox Friend WithEvents Label10 As System.Windows.Forms.Label Friend WithEvents DateTimePicker2 As

  System.Windows.Forms.DateTimePicker

  Friend WithEvents Label11 As System.Windows.Forms.Label Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents TextBox7 As System.Windows.Forms.TextBox Friend WithEvents DateTimePicker3 As

  System.Windows.Forms.DateTimePicker

  Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents ComboBox4 As System.Windows.Forms.ComboBox Friend WithEvents Label12 As System.Windows.Forms.Label Friend WithEvents TextBox8 As System.Windows.Forms.TextBox Friend WithEvents Label13 As System.Windows.Forms.Label

  End Class Imports MySql.Data.MySqlClient Public Class Form2

  Dim sql As String Sub bersih()

  TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" DateTimePicker1.Value = Now ComboBox1.Text = "" TextBox4.Text = "" ComboBox2.Text = "" ComboBox3.Text = ""

  IDV = 0 TextBox8.Text = "" ComboBox3.Text = "" TextBox5.Text = "" TextBox6.Text = "" DateTimePicker2.Value = Now

  End Sub Sub up()

  Using KN As New MySqlConnection(cn)

  Using CMD As New MySqlCommand( "UPDATE tblpenduduk SET nik='"

  & TextBox1.Text & _ "',nama='" & TextBox2.Text & "',tmplahir='" & TextBox3.Text & "',tgllahir='" &

  Format(DateTimePicker1.Value, "yyyy-MM-dd " ) & _ "',jnskel='" & ComboBox1.Text & "',Alamat='" & TextBox4.Text & "',kel='" & TextBox8.Text & "',agama='" &

  ComboBox2.Text & _ "',statusper='" &

  ComboBox3.Text & "',pekerjaan='" & TextBox5.Text & "',kewarganegaraan='" & TextBox6.Text & "',berlaku='" & Format(DateTimePicker2.Value, "yyyy-MM- dd" ) & "',statuskel='" & ComboBox4.Text & "' WHERE ID='" & IDV & "'" , KN) KN.Open() CMD.ExecuteNonQuery()

  End Using End Using

  bersih() frmpen.Tampildata()

  Me .Close() End Sub Sub SIMPAN()

  Using KN As New MySqlConnection(cn) Using CMD As New MySqlCommand( "INSERT INTO tblpenduduk

  (nik,nama,tmplahir,tgllahir,jnskel,Alamat,kel,agama,statusper,pekerjaan,k ewarganegaraan,berlaku,Status,Statuskel,tgl) values('" & TextBox1.Text & _

  "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & Format(DateTimePicker1.Value, "yyyy-MM-dd " ) & _

  "','" & ComboBox1.Text & "','" & TextBox4.Text & "','" & TextBox8.Text & "','" & ComboBox2.Text & _

  "','" & ComboBox3.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & _

  "','" & Format(DateTimePicker2.Value, "yyyy-MM-dd" ) & "','" & TextBox7.Text & _

  "','" & ComboBox4.Text & "','" & Format(DateTimePicker3.Value, "yyyy-MM-dd" ) & "')" , KN) KN.Open() CMD.ExecuteNonQuery()

  End Using End Using

  bersih() Sql = "Select * From tblpenduduk" frmpen.Tampildata()

  End Sub Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As

  System.EventArgs) Handles Button1.Click

  If v = True Then

  SIMPAN()

  End If If v = False Then

  up()

  End If End Sub Private Sub Form2_FormClosing( ByVal sender As Object , ByVal e As

  System.Windows.Forms.FormClosingEventArgs) Handles Me .FormClosing bersih()

  End Sub Private Sub Form2_Load( ByVal sender As System.Object, ByVal e As

  System.EventArgs) Handles MyBase .Load

  End Sub Private Sub Button2_Click( ByVal sender As System.Object, ByVal e As

  System.EventArgs) Handles Button2.Click

  Using KN As New MySqlConnection(cn) Using CMD As New MySqlCommand( "DELETE FROM tblpenduduk WHERE

  ID='" & IDV & "'" , KN) KN.Open() CMD.ExecuteNonQuery()

  End Using End Using

  bersih() frmpen.Tampildata()

  Me .Close() End Sub Private Sub Label9_Click( ByVal sender As System.Object, ByVal e As

  System.EventArgs) Handles Label9.Click

  End Sub Private Sub TextBox8_TextChanged( ByVal sender As System.Object, ByVal

  e As System.EventArgs) Handles TextBox8.TextChanged

  End Sub End Class

  Form login

  Imports MySql.Data.MySqlClient Public Class Form2

  Dim sql As String Sub bersih()

  TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" DateTimePicker1.Value = Now ComboBox1.Text = "" TextBox4.Text = "" ComboBox2.Text = "" ComboBox3.Text = ""

  IDV = 0 TextBox8.Text = ""

  ComboBox3.Text = "" TextBox5.Text = "" TextBox6.Text = "" DateTimePicker2.Value = Now

  End Sub Sub up()

  Using KN As New MySqlConnection(cn) Using CMD As New MySqlCommand( "UPDATE tblpenduduk SET nik='"

  & TextBox1.Text & _ "',nama='" & TextBox2.Text & "',tmplahir='" & TextBox3.Text & "',tgllahir='" &

  Format(DateTimePicker1.Value, "yyyy-MM-dd " ) & _ "',jnskel='" & ComboBox1.Text & "',Alamat='" & TextBox4.Text & "',kel='" & TextBox8.Text & "',agama='" &

  ComboBox2.Text & _ "',statusper='" &

  ComboBox3.Text & "',pekerjaan='" & TextBox5.Text & "',kewarganegaraan='" & TextBox6.Text & "',berlaku='" & Format(DateTimePicker2.Value, "yyyy-MM- dd" ) & "',statuskel='" & ComboBox4.Text & "' WHERE ID='" & IDV & "'" , KN) KN.Open() CMD.ExecuteNonQuery()

  End Using End Using

  bersih() frmpen.Tampildata()

  Me .Close() End Sub Sub SIMPAN()

  Using KN As New MySqlConnection(cn) Using CMD As New MySqlCommand( "INSERT INTO tblpenduduk

  (nik,nama,tmplahir,tgllahir,jnskel,Alamat,kel,agama,statusper,pekerjaan,k ewarganegaraan,berlaku,Status,Statuskel,tgl) values('" & TextBox1.Text & _

  "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & Format(DateTimePicker1.Value, "yyyy-MM-dd " ) & _

  "','" & ComboBox1.Text & "','" & TextBox4.Text & "','" & TextBox8.Text & "','" & ComboBox2.Text & _

  "','" & ComboBox3.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & _

  "','" & Format(DateTimePicker2.Value, "yyyy-MM-dd" ) & "','" & TextBox7.Text & _

  "','" & ComboBox4.Text & "','" & Format(DateTimePicker3.Value, "yyyy-MM-dd" ) & "')" , KN) KN.Open() CMD.ExecuteNonQuery()

  End Using End Using

  bersih() Sql = "Select * From tblpenduduk" frmpen.Tampildata()

  End Sub Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As

  System.EventArgs) Handles Button1.Click

  If v = True Then

  bersih() frmpen.Tampildata()

  Using Cmd As New MySqlCommand( "Select * From

  Try Using Koneksi As New MySqlConnection(cn)

  System.EventArgs) Handles BtnLogin.Click

  Dim s As Integer = 0 Private Sub BtnLogin_Click( ByVal sender As System.Object, ByVal e As

  End Sub End Class Imports MySql.Data.MySqlClient Public Class FormLogin

  e As System.EventArgs) Handles TextBox8.TextChanged

  End Sub Private Sub TextBox8_TextChanged( ByVal sender As System.Object, ByVal

  System.EventArgs) Handles Label9.Click

  Me .Close() End Sub Private Sub Label9_Click( ByVal sender As System.Object, ByVal e As

  End Using End Using

  SIMPAN()

  ID='" & IDV & "'" , KN) KN.Open() CMD.ExecuteNonQuery()

  Using KN As New MySqlConnection(cn) Using CMD As New MySqlCommand( "DELETE FROM tblpenduduk WHERE

  System.EventArgs) Handles Button2.Click

  End Sub Private Sub Button2_Click( ByVal sender As System.Object, ByVal e As

  System.EventArgs) Handles MyBase .Load

  End Sub Private Sub Form2_Load( ByVal sender As System.Object, ByVal e As

  System.Windows.Forms.FormClosingEventArgs) Handles Me .FormClosing bersih()

  End If End Sub Private Sub Form2_FormClosing( ByVal sender As Object , ByVal e As

  up()

  End If If v = False Then

  tablepengguna Where UserName='" & TextBox1.Text & "'" , Koneksi)

  Koneksi.Open()

  Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

  If TextBox2.Text = Trim(Data( "Password" )) Then

  TextBox1.Text = "" TextBox2.Text = ""

  Me .Hide()

  frmmenuutama.Show()

  Else

  MsgBox( "Pass Anda Salah" , MsgBoxStyle.Critical, "Error" ) s = s + 1

  If s >= 3 Then Me .Close()

  End If

  TextBox2.Text = "" TextBox2.Focus() TextBox2.Text = "" TextBox2.Focus()

  End If Else

  MsgBox( "User Anda Salah" , MsgBoxStyle.Critical, "Error" ) s = s + 1

  If s >= 3 Then

  ' MenuUtama.Close()

  End If

  TextBox1.Text = "" TextBox2.Text = "" TextBox1.Focus()

  End If End Using

  End Using End Using

  Catch ex As Exception

  MessageBox.Show(ex.Message)

  Finally End Try

  End Sub Private Sub TextBox1_KeyDown( ByVal sender As Object , ByVal e As

  System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown

  If e.KeyCode = 13 Then Me .TextBox2.Focus()

  Else Me .TextBox1.Focus() Exit Sub

  End If End Sub Private Sub TextBox2_KeyDown( ByVal sender As Object , ByVal e As

  System.Windows.Forms.KeyEventArgs) Handles TextBox2.KeyDown

  If e.KeyCode = 13 Then Me .BtnLogin.Focus()

  Else Me .TextBox2.Focus() Exit Sub

  End If End Sub Private Sub FormLogin_FormClosing( ByVal sender As Object , ByVal e As

  System.Windows.Forms.FormClosingEventArgs) Handles Me .FormClosing

  End Sub Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As

  System.EventArgs) Handles Button1.Click

  Me .Close() End Sub

  End Class

  < Global .Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _

  Partial Class FRMDAF Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list.

  <System.Diagnostics.DebuggerNonUserCode()> _

  Protected Overrides Sub Dispose( ByVal disposing As Boolean ) Try

  If disposing AndAlso components IsNot Nothing Then

  components.Dispose()

  End If Finally

  MyBase .Dispose(disposing) End Try

  End Sub

  'Required by the Windows Form Designer

  Private components As System.ComponentModel.IContainer

  'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor.

  <System.Diagnostics.DebuggerStepThrough()> _

  Private Sub InitializeComponent() Me .TextBox1 = New System.Windows.Forms.TextBox Me .TextBox2 = New System.Windows.Forms.TextBox Me .TextBox3 = New System.Windows.Forms.TextBox Me .TextBox4 = New System.Windows.Forms.TextBox Me .Button1 = New System.Windows.Forms.Button Me .DateTimePicker1 = New System.Windows.Forms.DateTimePicker Me .Label11 = New System.Windows.Forms.Label Me .Label1 = New System.Windows.Forms.Label Me .Label2 = New System.Windows.Forms.Label

  Me .Label3 = New System.Windows.Forms.Label Me .TextBox11 = New System.Windows.Forms.TextBox Me .TextBox14 = New System.Windows.Forms.TextBox Me .TextBox23 = New System.Windows.Forms.TextBox Me .TextBox24 = New System.Windows.Forms.TextBox Me .TextBox25 = New System.Windows.Forms.TextBox Me .TextBox26 = New System.Windows.Forms.TextBox Me .TextBox27 = New System.Windows.Forms.TextBox Me .TextBox36 = New System.Windows.Forms.TextBox Me .TextBox37 = New System.Windows.Forms.TextBox Me .TextBox38 = New System.Windows.Forms.TextBox Me .TextBox39 = New System.Windows.Forms.TextBox Me .TextBox40 = New System.Windows.Forms.TextBox Me .TextBox49 = New System.Windows.Forms.TextBox Me .TextBox50 = New System.Windows.Forms.TextBox Me .TextBox51 = New System.Windows.Forms.TextBox Me .TextBox52 = New System.Windows.Forms.TextBox Me .TextBox53 = New System.Windows.Forms.TextBox Me .TextBox62 = New System.Windows.Forms.TextBox Me .TextBox63 = New System.Windows.Forms.TextBox Me .TextBox64 = New System.Windows.Forms.TextBox Me .TextBox65 = New System.Windows.Forms.TextBox Me .Button2 = New System.Windows.Forms.Button Me .Label4 = New System.Windows.Forms.Label Me .ComboBox1 = New System.Windows.Forms.ComboBox Me .SuspendLayout()

  ' 'TextBox1 '

  Me .TextBox1.Location = New System.Drawing.Point(12, 127) Me .TextBox1.Name = "TextBox1" Me .TextBox1.ReadOnly = True Me .TextBox1.Size = New System.Drawing.Size(150, 20) Me .TextBox1.TabIndex = 0 Me .TextBox1.Text = "Penduduk Awal Bulan ini"

  ' 'TextBox2 '

  Me .TextBox2.Location = New System.Drawing.Point(183, 127) Me .TextBox2.Name = "TextBox2" Me .TextBox2.ReadOnly = True Me .TextBox2.Size = New System.Drawing.Size(33, 20) Me .TextBox2.TabIndex = 1 Me .TextBox2.TextAlign =

  System.Windows.Forms.HorizontalAlignment.Center ' 'TextBox3 '

  Me .TextBox3.Location = New System.Drawing.Point(217, 127) Me .TextBox3.Name = "TextBox3" Me .TextBox3.ReadOnly = True Me .TextBox3.Size = New System.Drawing.Size(33, 20) Me .TextBox3.TabIndex = 2

  Me .TextBox3.TextAlign =

  ' 'Label11 '

  Cond" , 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType (0, Byte ))

  Me .Label1.Font = New System.Drawing.Font( "Franklin Gothic Medium

  ' 'Label1 '

  CType (0, Byte )) Me .Label11.Location = New System.Drawing.Point(183, 89) Me .Label11.Name = "Label11" Me .Label11.Size = New System.Drawing.Size(101, 19) Me .Label11.TabIndex = 55 Me .Label11.Text = "WNRI PRIBUMI" Me .Label11.TextAlign = System.Drawing.ContentAlignment.TopCenter

  System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,

  Me .Label11.Font = New System.Drawing.Font( "Impact" , 11.25!,

  Me .DateTimePicker1.Location = New System.Drawing.Point(518, 15) Me .DateTimePicker1.Name = "DateTimePicker1" Me .DateTimePicker1.Size = New System.Drawing.Size(102, 20) Me .DateTimePicker1.TabIndex = 5

  System.Windows.Forms.HorizontalAlignment.Center ' 'TextBox4 '

  System.Windows.Forms.DateTimePickerFormat.[Short]

  Me .DateTimePicker1.Format =

  ' 'DateTimePicker1 '

  Me .Button1.Location = New System.Drawing.Point(84, 42) Me .Button1.Name = "Button1" Me .Button1.Size = New System.Drawing.Size(102, 32) Me .Button1.TabIndex = 4 Me .Button1.Text = "Cetak" Me .Button1.UseVisualStyleBackColor = True

  System.Windows.Forms.HorizontalAlignment.Center ' 'Button1 '