LAMPIRAN. Private Sub FrmSkinDetect_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load IndikatorHandle(False) End Sub

Size: px
Start display at page:

Download "LAMPIRAN. Private Sub FrmSkinDetect_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load IndikatorHandle(False) End Sub"

Transcription

1 92 LAMPIRAN List Program FDeteksiWajah.vb Imports System.ComponentModel Public Class FDeteksiWajah Private CGen As ClGeneral Dim CWajah As ClDeteksi Dim CShape As New ClShapeA Dim tprogress As Integer Private Sub IndikatorHandle(ByVal Kondisi As Boolean, Optional ByVal Pesan As String = "") If Kondisi Then Label1.Text = Pesan Label2.Text = "" Timer1.Enabled = True ProgressBar1.Visible = True Else Label1.Text = Pesan Label2.Text = "" Timer1.Enabled = False ProgressBar1.Visible = False Private Sub FrmSkinDetect_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load IndikatorHandle(False) Private Sub BWReadPixel_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BWReadPixel.DoWork Dim worker As BackgroundWorker = _ CType(sender, BackgroundWorker) Dim CImage As New ClImage CImage.ReadPixel(CType(e.Argument, ClGeneral), worker, e) Private Sub BWReadPixel_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BWReadPixel.ProgressChanged ProgressBar1.Value = e.progresspercentage Private Sub BWReadPixel_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BWReadPixel.RunWorkerCompleted Label1.Text = "Database Read.." BWDatabaseRead.RunWorkerAsync(CGen)

2 93 Private Sub BWDatabaseRead_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BWDatabaseRead.DoWork Dim worker As BackgroundWorker = _ CType(sender, BackgroundWorker) Dim CDb As New ClDatabase CDb.Connstring = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=" & Application.StartupPath & "\db.mdb" CDb.TblName = "tbl_color" CDb.ReadDBColor(CType(e.Argument, ClGeneral), worker, e) Private Sub BWDatabaseRead_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BWDatabaseRead.ProgressChanged ProgressBar1.Value = e.progresspercentage Private Sub BWDatabaseRead_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BWDatabaseRead.RunWorkerCompleted Label1.Text = "Skin Detection" BWDetectSkin.RunWorkerAsync(CGen) Private Sub BWDetectSkin_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BWDetectSkin.DoWork Dim worker As BackgroundWorker = _ CType(sender, BackgroundWorker) Dim CColorDetect As New ClColorDetect CColorDetect.DetectColor(CType(e.Argument, ClGeneral), worker, e) Private Sub BWDetectSkin_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BWDetectSkin.ProgressChanged ProgressBar1.Value = e.progresspercentage Private Sub BWDetectSkin_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BWDetectSkin.RunWorkerCompleted IndikatorHandle(True, "Binerisasi") BWBinerisasi.RunWorkerAsync(CGen) Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick Label2.Text = ProgressBar1.Value & " %" Private Sub BWBinerisasi_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BWBinerisasi.DoWork Dim worker As BackgroundWorker = _ CType(sender, BackgroundWorker)

3 94 Dim CImage As New ClImage CImage.Binerisasi(CType(e.Argument, ClGeneral), worker, e) Private Sub BWBinerisasi_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BWBinerisasi.ProgressChanged ProgressBar1.Value = e.progresspercentage Private Sub BWBinerisasi_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BWBinerisasi.RunWorkerCompleted IndikatorHandle(True, "Erosi..") BWErosi.RunWorkerAsync(CGen) Private Sub BWDilasi_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BWDilasi.DoWork Dim worker As BackgroundWorker = _ CType(sender, BackgroundWorker) Dim CShapeA As New ClShapeA CShapeA.Dilasi(CType(e.Argument, ClGeneral), worker, e) Private Sub BWDilasi_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BWDilasi.ProgressChanged ProgressBar1.Value = e.progresspercentage Private Sub BWDilasi_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BWDilasi.RunWorkerCompleted IndikatorHandle(True, "Face Area..") CShape = New ClShapeA BWKodeRantai.RunWorkerAsync(CGen) Private Sub BWErosi_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BWErosi.DoWork Dim worker As BackgroundWorker = _ CType(sender, BackgroundWorker) Dim CShapeA As New ClShapeA CShapeA.Erosi(CType(e.Argument, ClGeneral), worker, e) Private Sub BWErosi_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BWErosi.ProgressChanged ProgressBar1.Value = e.progresspercentage Private Sub BWErosi_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BWErosi.RunWorkerCompleted

4 95 IndikatorHandle(True, "Dilasi..") BWDilasi.RunWorkerAsync(CGen) Private Sub BWKodeRantai_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BWKodeRantai.DoWork Dim worker As BackgroundWorker = _ CType(sender, BackgroundWorker) Dim CShapeA As ClShapeA = CShape CShapeA.CariKandidat(CType(e.Argument, ClGeneral), worker, e) Private Sub BWKodeRantai_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BWKodeRantai.ProgressChanged ProgressBar1.Value = e.progresspercentage Private Sub BWKodeRantai_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BWKodeRantai.RunWorkerCompleted PictureBox7.Image = CGen.ResImage2.Clone PictureBox7.Refresh() CWajah = New ClDeteksi CWajah.JC = Val(TextBox1.Text) BWWajah.RunWorkerAsync(CWajah) Private Sub BWWajah_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BWWajah.DoWork Dim worker As BackgroundWorker = _ CType(sender, BackgroundWorker) Dim CWajah2 As ClDeteksi = CType(e.Argument, ClDeteksi) CWajah2.Persentase = Val(TextBox1.Text) CWajah2.Identifikasi(CShape, PictureBox1.Image, worker, e, tprogress) Private Sub BWWajah_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BWWajah.ProgressChanged ProgressBar1.Value = e.progresspercentage Private Sub BWWajah_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BWWajah.RunWorkerCompleted IndikatorHandle(False) Dim i As Integer ListView1.Items.Clear() Dim LV As ListViewItem For i = 0 To CWajah.LWajah.Count - 1 LV = ListView1.Items.Add(CWajah.LWajah(i).Nama) LV.SubItems.Add(CWajah.LWajah(i).Peluang)

5 96 Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click OpenFileDialog1.FileName = "" OpenFileDialog1.ShowDialog() If OpenFileDialog1.FileName <> "" Then PictureBox1.ImageLocation = OpenFileDialog1.FileName PictureBox1.Load() Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click CGen = New ClGeneral CGen.PubImage = PictureBox1.Image.Clone IndikatorHandle(True, "Scan Pixel") BWReadPixel.RunWorkerAsync(CGen) Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click Me.Close() End Class FFiturWajah.vb Imports System.ComponentModel Public Class FFiturWajah Dim CGen As ClGeneral Dim CKMeans As ClKMeans Dim JC As Integer Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click OpenFileDialog1.FileName = String.Empty OpenFileDialog1.ShowDialog() If OpenFileDialog1.FileName <> String.Empty Then Dim FIS As New IO.FileStream(OpenFileDialog1.FileName, IO.FileMode.Open) CGen = New ClGeneral CGen.PubImage = Image.FromStream(FIS) FIS.Close() PictureBox1.Image = CGen.PubImage Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click JC = Val(TextBox1.Text) CGen = New ClGeneral CGen.PubImage = PictureBox1.Image.Clone BackgroundWorker1.RunWorkerAsync(CGen)

6 97 Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick Private Sub BackgroundWorker1_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork Dim worker As BackgroundWorker = _ CType(sender, BackgroundWorker) Dim CImage As New ClImage CImage.ReadPixel(CType(e.Argument, ClGeneral), worker, e) Private Sub BackgroundWorker1_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BackgroundWorker1.ProgressChanged ProgressBar1.Value = e.progresspercentage Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted BackgroundWorker2.RunWorkerAsync(CGen) Private Sub BackgroundWorker2_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker2.DoWork Dim worker As BackgroundWorker = _ CType(sender, BackgroundWorker) CKMeans = New ClKMeans CKMeans.ScanCluster(CType(e.Argument, ClGeneral), JC) Private Sub BackgroundWorker2_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker2.RunWorkerCompleted ListView1.Items.Clear() Dim LV As ListViewItem Dim i As Integer For i = 0 To CKMeans.LCluster.Count - 1 LV = ListView1.Items.Add(i + 1) LV.SubItems.Add(CKMeans.LCluster(i).CR) LV.SubItems.Add(CKMeans.LCluster(i).CG) LV.SubItems.Add(CKMeans.LCluster(i).CB) LV.SubItems.Add(CKMeans.LCluster(i).Populasi) 'RichTextBox1.Text = CKMeans.Lapor Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click If CKMeans.LCluster.Count < 1 Then Exit Sub

7 98 Dim Konek As New OleDb.OleDbConnection Konek.ConnectionString = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=" & Application.StartupPath & "\db.mdb" Konek.Open() Dim CMD As OleDb.OleDbCommand = Konek.CreateCommand Dim DR1 As OleDb.OleDbDataReader "'" "'" CMD.CommandText = "delete from wajah where nama='" & TextBox2.Text & CMD.ExecuteNonQuery() CMD.CommandText = "delete from cluster where nama='" & TextBox2.Text & CMD.ExecuteNonQuery() CMD.CommandText = "insert into wajah(jcluster,nama) values(" & JC & ",'" & TextBox2.Text & "')" CMD.ExecuteNonQuery() Dim i As Integer For i = 0 To CKMeans.LCluster.Count - 1 With CKMeans.LCluster(i) CMD.CommandText = "insert into cluster(cr,cg,cb,pop,nama) values(" &.CR & "," &.CG & "," &.CB & "," &.Populasi & ",'" & TextBox2.Text & "')" CMD.ExecuteNonQuery() Konek.Close() MsgBox("Fitur Berhasil Di Simpan") Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton4.Click Me.Close() Private Sub ToolStrip1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles ToolStrip1.ItemClicked End Class FCover.vb Public Class FCover Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click Dim F As New FFiturWajah F.ShowDialog() Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click Dim F As New FDeteksiWajah

8 99 F.ShowDialog() Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton4.Click End End Class ClDeteksi.vb Imports System.ComponentModel Public Class ClDeteksi Public Class Wajah Public Nama As String Public Peluang As Double End Class Public LWajah As List(Of Wajah) Public Persentase As Double Public JC As Integer Public Sub Identifikasi(ByVal cshape As ClShapeA, ByVal Gambar As Bitmap, ByVal worker As BackgroundWorker, _ ByVal e As DoWorkEventArgs, ByRef tprogress As Integer) Dim i As Integer Dim j As Integer Dim k As Integer Dim l As Integer Dim m As Integer Dim GambarTes As Bitmap Dim XTengah As Integer Dim YTengah As Integer Dim XAwal As Integer Dim YAwal As Integer Dim XAkhir As Integer Dim YAkhir As Integer Dim Jarak As Double Dim Tamp1 As Double Dim Warna1 As Color Dim Warna2 As Color Dim tobjek As Wajah Dim R1 As Integer Dim G1 As Integer Dim B1 As Integer Dim R2 As Integer Dim G2 As Integer Dim B2 As Integer Dim CKMeans As ClKMeans Dim CKMeans2 As ClKMeans Dim CGen1 As ClGeneral Dim ClusterK As ClKMeans.Cluster

9 100 Dim PPiksel As ClGeneral.PubPixel Dim Konek2 As OleDb.OleDbConnection = New OleDb.OleDbConnection Dim CMD2 As OleDb.OleDbCommand Dim DR2 As OleDb.OleDbDataReader Dim Konek As OleDb.OleDbConnection = New OleDb.OleDbConnection Dim CMD1 As OleDb.OleDbCommand Dim DR1 As OleDb.OleDbDataReader Dim FIO As IO.FileStream Konek.ConnectionString = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=" & Application.StartupPath & "\db.mdb" Konek.Open() Konek2.ConnectionString = Konek.ConnectionString Konek2.Open() CMD2 = Konek2.CreateCommand If Konek.State = ConnectionState.Closed Then Exit Sub CMD1 = Konek.CreateCommand CMD1.CommandText = "select * from wajah where jcluster=" & JC DR1 = CMD1.ExecuteReader LWajah = New List(Of Wajah) If DR1.HasRows Then Do While DR1.Read For i = 0 To cshape.lwajah.count - 1 XAwal = cshape.lwajah(i).x1 XAkhir = cshape.lwajah(i).x2 YAwal = cshape.lwajah(i).y1 YAkhir = cshape.lwajah(i).y2 CGen1 = New ClGeneral CGen1.LPubPixel = New List(Of ClGeneral.PubPixel) For j = XAwal To XAkhir For k = YAwal To YAkhir Warna1 = Gambar.GetPixel(j, k) PPiksel = New ClGeneral.PubPixel PPiksel.R = Warna1.R PPiksel.G = Warna1.G PPiksel.B = Warna1.B CGen1.LPubPixel.Add(PPiksel) k = 0 l = 0 DR1("nama") & "'" CMD2.CommandText = "select * from cluster where nama='" & DR2 = CMD2.ExecuteReader If DR2.HasRows Then CKMeans = New ClKMeans CKMeans.LCluster = New List(Of ClKMeans.Cluster) Do While DR2.Read ClusterK = New ClKMeans.Cluster ClusterK.CR = DR2("cr")

10 101 ClusterK.CG = DR2("cg") ClusterK.CB = DR2("cb") ClusterK.Populasi = DR2("pop") CKMeans.LCluster.Add(ClusterK) Loop DR2.Close() CKMeans2 = New ClKMeans CKMeans2.ScanCluster2(CGen1, CKMeans.LCluster, JC) l = 0 k = CKMeans.LCluster.Count For j = 0 To CKMeans.LCluster.Count - 1 If CKMeans.LCluster(j).Populasi <= CKMeans2.LCluster(j).Populasi Then l += 1 Else l += (CKMeans2.LCluster(j).Populasi / CKMeans.LCluster(j).Populasi) If k > 0 Then k = (l / k) * 100 If k >= 70 Then tobjek = New Wajah tobjek.nama = DR1("nama") tobjek.peluang = k LWajah.Add(tObjek) tprogress = (i / cshape.lwajah.count) * 100 Loop DR1.Close() Konek.Close() End Class CLImage.vb Imports System Imports System.Collections Imports System.ComponentModel Imports System.Threading Imports DeteksiWajah.ClGeneral Public Class ClImage Private Structure ColorFind Dim R As Long Dim G As Long Dim B As Long End Structure

11 102 Dim tcolorf As New ColorFind Public Sub ReadPixel(ByRef CGen As ClGeneral, ByVal worker As BackgroundWorker, _ ByVal e As DoWorkEventArgs) 100) Dim tbitmap As Bitmap = CGen.PubImage.Clone Dim tcolor As Color Dim i As Long = 0 Dim j As Long = 0 Dim k As Long = 0 Dim tpixel As PubPixel = Nothing CGen.LPubPixel = New List(Of PubPixel) For i = 0 To tbitmap.width - 1 For j = 0 To tbitmap.height - 1 If worker.cancellationpending = True Then e.cancel = True Exit Sub tcolor = tbitmap.getpixel(i, j) tpixel = New PubPixel tpixel.x = i + 1 tpixel.y = j + 1 tpixel.r = tcolor.r tpixel.g = tcolor.g tpixel.b = tcolor.b CGen.LPubPixel.Add(tPixel) k += 1 worker.reportprogress((k / (tbitmap.width * tbitmap.height)) * Public Sub RecColor(ByRef CGen As ClGeneral, ByVal worker As BackgroundWorker, _ ByVal e As DoWorkEventArgs) Dim i As Long = 0 Dim j As Long = 0 Dim k As Long = 0 Dim TempColor As List(Of HistColor) = Nothing Dim TempColor2 As HistColor = Nothing Dim temp As Long = 0 TempColor = CGen.LHistColor For i = 0 To CGen.LPubPixel.Count - 1 If worker.cancellationpending = True Then e.cancel = True Exit Sub 'temp = CGen.LPubPixel.Item(i).R

12 103 'temp += CGen.LPubPixel.Item(i).G 'temp += CGen.LPubPixel.Item(i).B temp = 1 tcolorf.r = CGen.LPubPixel.Item(i).R / temp tcolorf.g = CGen.LPubPixel.Item(i).G / temp tcolorf.b = CGen.LPubPixel.Item(i).B / temp k = -1 k = TempColor.FindIndex(AddressOf FindColor) If k >= 0 Then TempColor.Item(k).Bin += 1 Else TempColor2 = New HistColor TempColor2.R = tcolorf.r TempColor2.G = tcolorf.g TempColor2.B = tcolorf.b TempColor2.Bin = 1 TempColor.Add(TempColor2) worker.reportprogress((i / (CGen.LPubPixel.Count - 1)) * 100) CGen.LHistColor = TempColor Private Function FindColor(ByVal tcolor As HistColor) As Boolean Dim Jarak As Double Jarak = Math.Pow(tColorF.R - tcolor.r, 2) Jarak += Math.Pow(tColorF.G - tcolor.g, 2) Jarak += Math.Pow(tColorF.B - tcolor.b, 2) Jarak = Math.Sqrt(Jarak) If Jarak <= 10 Then Return True Else Return False End Function Public Sub Binerisasi(ByRef CGen As ClGeneral, ByVal worker As BackgroundWorker, _ ByVal e As DoWorkEventArgs) Dim temppixel As ClGeneral.PubPixel = Nothing Dim i As Long = 0 Dim tempimage As Bitmap = New Bitmap(CGen.PubImage) For i = 0 To CGen.LPubPixel.Count - 1 With CGen.LPubPixel.Item(i) If.R > 0 And.G > 0 And.B > 0 Then.R = 255.G = 255.B = 255 tempimage.setpixel(.x - 1,.Y - 1, Color.FromArgb(.R,.G,.B))

13 104 worker.reportprogress((i / (CGen.LPubPixel.Count - 1)) * 100) CGen.ResImage1 = New Bitmap(tempImage) tempimage.dispose() End Class CLDetectColor.vb Imports System Imports System.Collections Imports System.ComponentModel Imports System.Threading Imports System.Drawing Imports DeteksiWajah.ClGeneral Public Class ClColorDetect Private Class ColorF Public R As Long Public G As Long Public B As Long End Class Private tcolorf As ColorF Public Sub DetectColor(ByRef CGen As ClGeneral, ByVal worker As BackgroundWorker, _ ByVal e As DoWorkEventArgs) Dim i As Long = 0 Dim k As Long = 0 Dim tempimage As Bitmap tempimage = New Bitmap(CGen.PubImage) Dim tcolor As Color = Nothing Dim Peluang As Double = 0 For i = 0 To CGen.LPubPixel.Count - 1 If worker.cancellationpending = True Then e.cancel = True Exit Sub tcolorf = New ColorF tcolorf.r = CGen.LPubPixel.Item(i).R tcolorf.g = CGen.LPubPixel.Item(i).G tcolorf.b = CGen.LPubPixel.Item(i).B k = -1 k = CGen.LHistColor.FindIndex(AddressOf FindColor) If k < 0 Then With CGen.LPubPixel.Item(i) tempimage.setpixel(.x - 1,.Y - 1, Color.FromArgb(0, 0, 0)).R = 0

14 105 0)).G = 0.B = 0 Else Peluang = CGen.LHistColor(k).Bin / CGen.MaxHistBin If Peluang < 0.01 Then With CGen.LPubPixel.Item(i) tcolor = Color.FromArgb(0, 0, 0) tempimage.setpixel(.x - 1,.Y - 1, Color.FromArgb(0, 0,.R = 0.G = 0.B = 0 worker.reportprogress((i / (CGen.LPubPixel.Count - 1)) * 100) CGen.ResImage1 = tempimage.clone tempimage.dispose() Private Function FindColor(ByVal tcolor As HistColor) As Boolean Dim Jarak As Double Jarak = Math.Pow(tColorF.R - tcolor.r, 2) Jarak += Math.Pow(tColorF.G - tcolor.g, 2) Jarak += Math.Pow(tColorF.B - tcolor.b, 2) Jarak = Math.Sqrt(Jarak) If Jarak <= 10 Then Return True Else Return False End Function End Class ClDatabase.vb Imports System Imports System.Collections Imports System.ComponentModel Imports System.Threading Imports DeteksiWajah.ClGeneral Public Class ClDatabase Public TblName As String Public Connstring As String Public Sub ReadDBColor(ByRef CGen As ClGeneral, ByVal worker As BackgroundWorker, _ ByVal e As DoWorkEventArgs) Dim TempHist As HistColor = Nothing

15 106 Dim DbConnection As New OleDb.OleDbConnection DbConnection.ConnectionString = Connstring DbConnection.Open() Dim DbCommand As OleDb.OleDbCommand = DbConnection.CreateCommand DbCommand.CommandText = "select * from " & TblName Dim DbReader As OleDb.OleDbDataReader = DbCommand.ExecuteReader CGen.LHistColor = New List(Of HistColor) Dim TempSum As Long = 0 If DbReader.HasRows Then Do While DbReader.Read If worker.cancellationpending = True Then e.cancel = True DbReader.Close() DbConnection.Close() Exit Sub TempHist = New HistColor TempHist.R = DbReader(1) TempHist.G = DbReader(2) TempHist.B = DbReader(3) TempHist.Bin = DbReader(4) If TempSum < TempHist.Bin Then TempSum = TempHist.Bin CGen.LHistColor.Add(TempHist) Loop CGen.MaxHistBin = TempSum DbReader.Close() DbConnection.Close() Public Sub SaveDbColor(ByRef CGen As ClGeneral, ByVal worker As BackgroundWorker, _ ByVal e As DoWorkEventArgs) Dim i As Long = 0 Dim CString As String = "" Dim DbConnection As New OleDb.OleDbConnection DbConnection.ConnectionString = Connstring DbConnection.Open() Dim DbCommand As OleDb.OleDbCommand = DbConnection.CreateCommand DbCommand.CommandText = "delete from tbl_color" DbCommand.ExecuteNonQuery() For i = 0 To CGen.LHistColor.Count - 1 With CGen.LHistColor If worker.cancellationpending = True Then e.cancel = True DbConnection.Close() Exit Sub

16 107 CString = "insert into tbl_color(r,g,b,bin) values(" &.Item(i).R & ", " &.Item(i).G & _ ", " &.Item(i).B & ", " &.Item(i).Bin & ")" DbCommand.CommandText = CString DbCommand.ExecuteNonQuery() worker.reportprogress((i / (.Count - 1)) * 100) DbConnection.Close() End Class ClShape.vb Imports System Imports System.Collections Imports System.ComponentModel Public Class ClShapeA Private Class kcari Public X As Long Public Y As Long End Class Private Class TempPixel Public X As Long Public Y As Long Public R As Long Public G As Long Public B As Long Public Label As Long End Class Private Class TitikObjek Public X As Long Public Y As Long Public Nilai As Long End Class Private Class Objek Public Titik As List(Of TitikObjek) Public Nama As String Public Kode As String Public P As Double Public Area As Double End Class Public Class Wajah Public X1 As Long Public X2 As Long Public Y1 As Long Public Y2 As Long End Class Private LCObjek As List(Of Objek) Public LWajah As List(Of Wajah) Private tbitmap As Bitmap

17 108 Private LTempPixel As List(Of TempPixel) Private tempcari As kcari = Nothing Private tempnilaicari As Long Public Sub CariKandidat(ByRef CGen As ClGeneral, ByVal worker As BackgroundWorker, _ ByVal e As DoWorkEventArgs) Dim i As Long = 0 Dim j As Long = 0 Dim k As Long = 0 Dim l As Long = 0 Dim temp As Long = 0 Dim OCount As Long = 0 Dim z As Long = 0 Dim TempTObjek As TitikObjek = Nothing Dim TempObjek As Objek = Nothing Dim TTempPixel As TempPixel = Nothing Dim TampX As Long = 0 Dim TampY As Long = 0 Dim ArrUrutanObjek(,) As Long tbitmap = New Bitmap(CGen.PubImage) Dim ArrObjek(tBitmap.Width - 1, tbitmap.height - 1, 1) As Long CGen.JumlahKandidat = 0 LTempPixel = New List(Of TempPixel) For i = 0 To CGen.LPubPixel.Count - 1 ArrObjek(CGen.LPubPixel.Item(i).X - 1, CGen.LPubPixel.Item(i).Y - 1, 0) = CGen.LPubPixel.Item(i).R ArrObjek(CGen.LPubPixel.Item(i).X - 1, CGen.LPubPixel.Item(i).Y - 1, 1) = 0 worker.reportprogress((i / (CGen.LPubPixel.Count - 1)) * 100) z = 1 OCount = 0 LCObjek = New List(Of Objek) For i = 1 To tbitmap.width - 2 For j = 1 To tbitmap.height - 2 If ArrObjek(i, j, 1) > 0 Then j += 1 If j <= tbitmap.height - 1 Then Do While ArrObjek(i, j, 0) > 0 j += 1 If j > tbitmap.height - 1 Then Exit Do Loop ElseIf ArrObjek(i, j, 1) = 0 And ArrObjek(i, j, 0) > 0 Then OCount += 1 TampX = i TampY = j TempTObjek = New TitikObjek TempTObjek.X = i TempTObjek.Y = j TempTObjek.Nilai = 255

18 109 TempObjek = New Objek TempObjek.Titik = New List(Of TitikObjek) TempObjek.Titik.Add(TempTObjek) TempObjek.Nama = OCount TempObjek.Kode = "" l = j k = i temp = 0 Do While temp >= 0 temp = CekTetangga(k, l, ArrObjek) If temp > -1 Then ArrObjek(k, l, 1) = OCount TempTObjek = New TitikObjek TempTObjek.X = k TempTObjek.Y = l TempTObjek.Nilai = 255 TempObjek.Titik.Add(TempTObjek) TempObjek.Kode &= temp Loop LCObjek.Add(TempObjek) j += 1 If j <= tbitmap.height - 1 Then Do While ArrObjek(i, j, 0) > 0 j += 1 If j > tbitmap.height - 1 Then Exit Do Loop Else If ArrObjek(i, j, 0) > 0 Then Do While ArrObjek(i, j, 0) > 0 j += 1 If j > tbitmap.height - 1 Then Exit Do Loop worker.reportprogress((z / (tbitmap.width * tbitmap.height)) * 100) z += 1 tbitmap = New Bitmap(CGen.PubImage) tempnilaicari = 10 Do While True k = -1 k = LCObjek.FindIndex(AddressOf CariJumlahTitik) If k >= 0 Then LCObjek.RemoveAt(k) Else Exit Do

19 110 Loop For k = 0 To LCObjek.Count - 1 With LCObjek.Item(k) For l = 0 To.Titik.Count - 1 With.Titik.Item(l) If k Mod 2 = 0 Then tbitmap.setpixel(.x,.y, Color.FromArgb(0, 255, 0)) ElseIf k Mod 3 = 0 Then tbitmap.setpixel(.x,.y, Color.FromArgb(255, 0, 0)) Else tbitmap.setpixel(.x,.y, Color.FromArgb(0, 0, 255)) worker.reportprogress((k / (LCObjek.Count - 1)) * 100) CGen.ResImage1 = New Bitmap(tBitmap) ReDim ArrUrutanObjek(LCObjek.Count - 1, 1) For i = 0 To LCObjek.Count - 1 ArrUrutanObjek(i, 0) = i ArrUrutanObjek(i, 1) = LCObjek.Item(i).Titik.Count Dim txmax As Long = 0 Dim tymax As Long = 0 Dim txmin As Long = 0 Dim tymin As Long = 0 Dim JarakHor As Double = 0 Dim JarakVer As Double = 0 Dim tempwajah As Wajah = Nothing Dim tvalid As Boolean = False Dim sindexy As Long = 0 Dim sindexx As Long = 0 Dim tpixel As Long = 0 LWajah = New List(Of Wajah) For i = 0 To LCObjek.Count - 1 With LCObjek.Item(i) TampX =.Titik.Item(0).X TampY =.Titik.Item(0).Y tymin = TampY txmin = TampX txmax = TampX tymax = TampY tvalid = False For j = 1 To.Titik.Count - 1 If tymin >.Titik.Item(j).Y Then tymin =.Titik.Item(j).Y sindexy = j For j = 1 To.Titik.Count - 1

20 111 If txmin >.Titik.Item(j).X Then txmin =.Titik.Item(j).X sindexx = j For j = 1 To.Titik.Count - 1 If txmax <.Titik.Item(j).X Then txmax =.Titik.Item(j).X sindexx = j For j = 1 To.Titik.Count - 1 If tymax <.Titik.Item(j).Y Then tymax =.Titik.Item(j).Y sindexy = j For j = sindexx To 1 Step -1 k =.Titik.Item(j).X l =.Titik.Item(j).Y If tymin > l Then tymin = l If tymax < l Then tymax = l JarakVer = Math.Pow(txMin - txmax, 2) JarakVer += Math.Pow(tyMin - tymin, 2) JarakVer = Math.Sqrt(JarakVer) JarakHor = Math.Pow(txMin - txmin, 2) JarakHor += Math.Pow(tyMin - tymax, 2) JarakHor = Math.Sqrt(JarakHor) If ((tymax - tymin) / (txmax - txmin)) < 3 And ((tymax - tymin) / (txmax - txmin)) > 0.5 Then tpixel = 0 For k = txmin To txmax For l = tymin To tymax If ArrObjek(k, l, 1) > 0 Then sindexx = ArrObjek(k, l, 1) l += 1 If l > tymax Then Exit For Do While ArrObjek(k, l, 1) <> sindexx If ArrObjek(k, l, 0) > 0 Then tpixel += 1 l += 1 If l > tymax Then Exit For

21 112 Loop 'If tpixel > 0 Then ' tvalid = True ' Exit For ' If (tpixel / ((tymax - tymin) * (txmax - txmin))) > 0.3 And (tpixel / ((tymax - tymin) * (txmax - txmin))) <= 0.95 Then 'And JarakHor >= JarakVer Then tvalid = True Exit For If tvalid Then tempwajah = New Wajah tempwajah.x1 = txmin tempwajah.y1 = tymin tempwajah.x2 = txmax tempwajah.y2 = tymax LWajah.Add(tempWajah) worker.reportprogress((i / (LCObjek.Count - 1)) * 100) CGen.JumlahKandidat = LWajah.Count CGen.JumlahWajah = 0 Dim LRata As Double = 0 For i = 0 To LWajah.Count - 1 With LWajah.Item(i) LRata += (.X2 -.X1) * (.Y2 -.Y1) LRata = LRata / LWajah.Count i = 0 Do While True If LWajah.Count < 1 Then Exit Do With LWajah.Item(i) If LRata > (((.X2 -.X1) * (.Y2 -.Y1)) * 1.5) Then LWajah.RemoveAt(i) i -= 1 If i < 0 Then If i = LWajah.Count - 1 Then Exit Do i += 1

22 113 Else If i = LWajah.Count - 1 Then Exit Do i += 1 Loop CGen.JumlahWajah = LWajah.Count tbitmap = New Bitmap(CGen.PubImage) For i = 0 To LWajah.Count - 1 'If i = 0 Then With LWajah.Item(i) For k =.X1 To.X2 tbitmap.setpixel(k,.y1, Color.FromArgb(255, 255, 0)) For k =.Y1 To.Y2 tbitmap.setpixel(.x1, k, Color.FromArgb(255, 255, 0)) For k =.X1 To.X2 tbitmap.setpixel(k,.y2, Color.FromArgb(255, 255, 0)) For k =.Y1 To.Y2 tbitmap.setpixel(.x2, k, Color.FromArgb(255, 255, 0)) ' worker.reportprogress(((i + 1) / (LWajah.Count)) * 100) CGen.ResImage2 = New Bitmap(tBitmap) Private Function CariJumlahTitik(ByVal ttitik As Objek) As Boolean If ttitik.titik.count <= tempnilaicari Then Return True Else Return False End Function Private Function CekTetangga(ByRef tx As Long, ByRef ty As Long, ByRef tarr(,,) As Long) As Long Dim tempx As Long = 0 Dim tempy As Long = 0 'check kode 2... tempx = tx tempy = ty tempy -= 1 If tempy >= 0 Then If tarr(tempx, tempy, 0) > 0 And tarr(tempx, tempy, 1) = 0 Then tempx -= 1

23 114 If tempx >= 0 Then If tarr(tempx, tempy, 0) = 0 Then tx = tempx + 1 ty = tempy Return 2 If tempx < 0 Then tempx += 1 tx = tempx + 1 ty = tempy Return 2 'check kode 1... tempx = tx tempy = ty tempx += 1 tempy -= 1 If tempx <= tbitmap.width - 1 And tempy >= 0 Then If tarr(tempx, tempy, 0) > 0 And tarr(tempx, tempy, 1) = 0 Then tempx -= 1 'If tempx >= 0 Then If tarr(tempx, tempy, 0) = 0 Then tx = tempx + 1 ty = tempy Return 1 ' 'check kode 0... tempx = tx tempy = ty tempx += 1 If tempx <= tbitmap.width - 1 Then If tarr(tempx, tempy, 0) > 0 And tarr(tempx, tempy, 1) = 0 Then tempy -= 1 If tempy >= 0 Then If tarr(tempx, tempy, 0) = 0 Then tx = tempx ty = tempy + 1 Return 0 If tempy < 0 Then tempy += 1 tx = tempx ty = tempy + 1 Return 0

24 115 'check kode 7... tempx = tx tempy = ty tempx += 1 tempy += 1 If tempx <= tbitmap.width - 1 And tempy <= tbitmap.height - 1 Then If tarr(tempx, tempy, 0) > 0 And tarr(tempx, tempy, 1) = 0 Then tempy -= 1 'If tempy >= 0 Then If tarr(tempx, tempy, 0) = 0 Then tx = tempx ty = tempy + 1 Return 7 ' 'check kode 6... tempx = tx tempy = ty tempy += 1 If tempy <= tbitmap.height - 1 Then If tarr(tempx, tempy, 0) > 0 And tarr(tempx, tempy, 1) = 0 Then tempx += 1 If tempx <= tbitmap.width - 1 Then If tarr(tempx, tempy, 0) = 0 Then tx = tempx - 1 ty = tempy Return 6 If tempx > tbitmap.width - 1 Then tempx -= 1 tx = tempx - 1 ty = tempy Return 6 'check kode 5... tempx = tx tempy = ty tempy += 1 tempx -= 1 If tempy <= tbitmap.height - 1 And tempx >= 0 Then If tarr(tempx, tempy, 0) > 0 And tarr(tempx, tempy, 1) = 0 Then tempx += 1 'If tempx <= tbitmap.width - 1 Then If tarr(tempx, tempy, 0) = 0 Then tx = tempx - 1 ty = tempy Return 5 '

25 116 'check kode 4... tempx = tx tempy = ty 'tempy += 1 tempx -= 1 If tempx >= 0 Then If tarr(tempx, tempy, 0) > 0 And tarr(tempx, tempy, 1) = 0 Then tempy += 1 If tempy <= tbitmap.height - 1 Then If tarr(tempx, tempy, 0) = 0 Then tx = tempx ty = tempy - 1 Return 4 If tempy > tbitmap.height - 1 Then tempy -= 1 tx = tempx ty = tempy - 1 Return 4 'check kode 3... tempx = tx tempy = ty tempy -= 1 tempx -= 1 If tempx >= 0 And tempy >= 0 Then If tarr(tempx, tempy, 0) > 0 And tarr(tempx, tempy, 1) = 0 Then tempy += 1 'If tempy <= tbitmap.height - 1 Then If tarr(tempx, tempy, 0) = 0 Then tx = tempx ty = tempy - 1 Return 3 ' Return -1 End Function Public Sub Dilasi(ByRef CGen As ClGeneral, ByVal worker As BackgroundWorker, _ ByVal e As DoWorkEventArgs) Dim i As Long = 0 Dim k As Long = 0 Dim tempnilai As Long = 0 Dim tempmax As Long = 0 Dim temppixel As ClGeneral.PubPixel = Nothing Dim tempimage As New Bitmap(CGen.PubImage) Dim temparr(tempimage.width - 1, tempimage.height - 1) As Long

26 117 Dim DilasiC As Long = 0 For DilasiC = 1 To 2 For i = 0 To CGen.LPubPixel.Count - 1 With CGen.LPubPixel.Item(i) temparr(.x - 1,.Y - 1) =.R worker.reportprogress((i / (CGen.LPubPixel.Count - 1)) * 100) For i = 0 To CGen.LPubPixel.Count - 1 With CGen.LPubPixel.Item(i) If.X > 1 And.Y > 1 And.X < tempimage.width And.Y < tempimage.height And.R < 255 Then tempmax = 0 If temparr((.x - 1) - 1, (.Y - 1) - 1) > 0 Then If temparr((.x - 1), (.Y - 1) - 1) > 0 Then If temparr((.x - 1) + 1, (.Y - 1) - 1) > 0 Then ' If temparr((.x - 1) - 1, (.Y - 1)) > 0 Then 'If temparr((.x - 1), (.Y - 1)) > 0 Then ' ' If temparr((.x - 1) + 1, (.Y - 1)) > 0 Then ' If temparr((.x - 1) - 1, (.Y - 1) + 1) > 0 Then If temparr((.x - 1), (.Y - 1) + 1) > 0 Then If temparr((.x - 1) + 1, (.Y - 1) + 1) > 0 Then.R = tempmax.g = tempmax.b = tempmax

27 118.G,.B)).G,.B)) tempimage.setpixel(.x - 1,.Y - 1, Color.FromArgb(.R, Else tempimage.setpixel(.x - 1,.Y - 1, Color.FromArgb(.R, worker.reportprogress((i / (CGen.LPubPixel.Count - 1)) * 100) CGen.ResImage1 = New Bitmap(tempImage) tempimage.dispose() Public Sub Dilasi2(ByRef CGen As ClGeneral, ByVal worker As BackgroundWorker, _ ByVal e As DoWorkEventArgs) Dim i As Long = 0 Dim k As Long = 0 Dim tempnilai As Long = 0 Dim tempmax As Long = 0 Dim temppixel As ClGeneral.PubPixel = Nothing Dim tempimage As New Bitmap(CGen.PubImage) Dim temparr(tempimage.width - 1, tempimage.height - 1) As Long Dim DilasiC As Long = 0 For DilasiC = 1 To 1 For i = 0 To CGen.LPubPixel.Count - 1 With CGen.LPubPixel.Item(i) temparr(.x - 1,.Y - 1) =.R worker.reportprogress((i / (CGen.LPubPixel.Count - 1)) * 100) For i = 0 To CGen.LPubPixel.Count - 1 With CGen.LPubPixel.Item(i) If.X > 1 And.Y > 1 And.X < tempimage.width And.Y < tempimage.height And.R < 255 Then tempmax = 0 If temparr((.x - 1) - 1, (.Y - 1) - 1) > 0 Then If temparr((.x - 1), (.Y - 1) - 1) > 0 Then If temparr((.x - 1) + 1, (.Y - 1) - 1) > 0 Then ' If temparr((.x - 1) - 1, (.Y - 1)) > 0 Then

28 119.G,.B)).G,.B)) 'If temparr((.x - 1), (.Y - 1)) > 0 Then ' ' If temparr((.x - 1) + 1, (.Y - 1)) > 0 Then ' If temparr((.x - 1) - 1, (.Y - 1) + 1) > 0 Then If temparr((.x - 1), (.Y - 1) + 1) > 0 Then If temparr((.x - 1) + 1, (.Y - 1) + 1) > 0 Then.R = tempmax.g = tempmax.b = tempmax tempimage.setpixel(.x - 1,.Y - 1, Color.FromArgb(.R, Else tempimage.setpixel(.x - 1,.Y - 1, Color.FromArgb(.R, worker.reportprogress((i / (CGen.LPubPixel.Count - 1)) * 100) CGen.ResImage1 = New Bitmap(tempImage) tempimage.dispose() _ Public Sub Erosi(ByRef CGen As ClGeneral, ByVal worker As BackgroundWorker, ByVal e As DoWorkEventArgs) Dilasi2(CGen, worker, e) Dim i As Long = 0 Dim k As Long = 0 Dim tempnilai As Long = 0 Dim tempmax As Long = 0 Dim temppixel As ClGeneral.PubPixel = Nothing Dim tempimage As New Bitmap(CGen.PubImage) Dim temparr(tempimage.width - 1, tempimage.height - 1) As Long Dim ErosiC As Long = 0 For ErosiC = 1 To 4 For i = 0 To CGen.LPubPixel.Count - 1 With CGen.LPubPixel.Item(i) temparr(.x - 1,.Y - 1) =.R

29 120 worker.reportprogress((i / (CGen.LPubPixel.Count - 1)) * 100) For i = 0 To CGen.LPubPixel.Count - 1 With CGen.LPubPixel.Item(i) If.X > 1 And.Y > 1 And.X < tempimage.width And.Y < tempimage.height And.R > 0 Then If temparr((.x - 1) - 1, (.Y - 1) - 1) < 255 Then tempmax = 0 If temparr((.x - 1), (.Y - 1) - 1) < 255 Then tempmax = 0 If temparr((.x - 1) + 1, (.Y - 1) - 1) < 255 Then tempmax = 0 ' If temparr((.x - 1) - 1, (.Y - 1)) < 255 Then tempmax = 0 'If temparr((.x - 1), (.Y - 1)) > 0 Then ' ' If temparr((.x - 1) + 1, (.Y - 1)) < 255 Then tempmax = 0 ' If temparr((.x - 1) - 1, (.Y - 1) + 1) < 255 Then tempmax = 0 If temparr((.x - 1), (.Y - 1) + 1) < 255 Then tempmax = 0 If temparr((.x - 1) + 1, (.Y - 1) + 1) < 255 Then tempmax = 0.R = tempmax.g = tempmax.b = tempmax.g,.b)).g,.b)) tempimage.setpixel(.x - 1,.Y - 1, Color.FromArgb(.R, Else tempimage.setpixel(.x - 1,.Y - 1, Color.FromArgb(.R,

30 121 worker.reportprogress((i / (CGen.LPubPixel.Count - 1)) * 100) For i = 0 To CGen.LPubPixel.Count - 1 With CGen.LPubPixel.Item(i) temparr(.x - 1,.Y - 1) =.R worker.reportprogress((i / (CGen.LPubPixel.Count - 1)) * 100) For i = 0 To CGen.LPubPixel.Count - 1 With CGen.LPubPixel.Item(i) If.X > 1 And.Y > 1 And.X < tempimage.width And.Y < tempimage.height And.R > 0 Then tempmax = 0 If temparr((.x - 1) - 1, (.Y - 1) - 1) > 0 Then tempmax += 1 If temparr((.x - 1), (.Y - 1) - 1) > 0 Then tempmax += 1 If temparr((.x - 1) + 1, (.Y - 1) - 1) > 0 Then tempmax += 1 ' If temparr((.x - 1) - 1, (.Y - 1)) > 0 Then tempmax += 1 'If temparr((.x - 1), (.Y - 1)) > 0 Then ' ' If temparr((.x - 1) + 1, (.Y - 1)) > 0 Then tempmax += 1 ' If temparr((.x - 1) - 1, (.Y - 1) + 1) > 0 Then tempmax += 1 If temparr((.x - 1), (.Y - 1) + 1) > 0 Then tempmax += 1 If temparr((.x - 1) + 1, (.Y - 1) + 1) > 0 Then tempmax += 1 If tempmax >= 2 Then Else tempmax = 0

31 122.G,.B)).G,.B)) End Class.R = tempmax.g = tempmax.b = tempmax tempimage.setpixel(.x - 1,.Y - 1, Color.FromArgb(.R, Else tempimage.setpixel(.x - 1,.Y - 1, Color.FromArgb(.R, worker.reportprogress((i / (CGen.LPubPixel.Count - 1)) * 100) CGen.ResImage1 = New Bitmap(tempImage) tempimage.dispose()

32 123 CURRICULUM VITAE Data Pribadi Nama : Septy Diana Sari Saragih Tempat/Tanggal Lahir : Binjai / 28 September 1991 Tinggi/Berat Badan : 163 cm / 42 kg Agama : Islam Kewarganegaraan : Indonesia Alamat : Jl. Klambir V Gg. Kalpataru No. 7 Medan Alamat Orang Tua : Jl. Klambir V Gg. Kalpataru No. 7 Medan Telp/ Hp : chiqels@gmail.com Riwayat Pendidikan [ ] : S1 Ilmu Komputer, Medan [ ] : SMA Negeri 15 Medan [ ] : SMP Negeri 7 Medan [ ] : SD Negeri Binjai Keahlian/Kursus Keahlian Komputer Bahasa : Pemrograman : C++, Visual Basic English Database : MySQL Indonesia Perkantoran : Microsoft Office Pengalaman Organisasi [ ] Sekretaris PSDM PEMA FASILKOM-TI USU

33 124 [ ] Anggota IMILKOM 2011/2012 [ ] Anggota IMILKOM Pengalaman Kepanitiaan [2010] Anggota Seksi Perlengkapan Seminar I-Pear ILKOM [2012] Koordinator Kesehatan PMB IMILKOM USU Seminar [2014] Seminar Nasional Literasi Informasi SENARAI

LISTING PROGRAM. a = b; b = c; c = a + b; } fibs.reverse(); for (int i = 0; i < fibs.count; i++) { if (n >= fibs[i]) { n = n - fibs[i];

LISTING PROGRAM. a = b; b = c; c = a + b; } fibs.reverse(); for (int i = 0; i < fibs.count; i++) { if (n >= fibs[i]) { n = n - fibs[i]; A-1 A LISTING PROGRAM 1. Fibonacci Code //membuat fungsi Fibonacci Code public static String GetFibonacciCode(int n) { StringBuilder fib = new StringBuilder("1"); int a, b, c; List fibs = new List();

More information

LISTING PROGRAM. 1. Module SkripsiUmri.py. import sys, operator, codecs, time. class Timer(object): def init (self): self.t1= time.

LISTING PROGRAM. 1. Module SkripsiUmri.py. import sys, operator, codecs, time. class Timer(object): def init (self): self.t1= time. A1 LISTING PROGRAM 1. Module SkripsiUmri.py import sys, operator, codecs, time class Timer(object): def init (self): self.t1= time.time() def getelapsedltime(self): # gets total elapsed from class initialsation

More information

LAMPIRAN A LISTING PROGRAM

LAMPIRAN A LISTING PROGRAM A-1 LAMPIRAN A LISTING PROGRAM FUNGSI public void StopWatchStart() stopwatch.reset(); stopwatch.start(); Cursor.Current = Cursors.WaitCursor; txtlog.text = ""; public void StopWatchStop(string Title) stopwatch.stop();

More information

LISTING PROGRAM. mainform.vb A-1. Universitas Sumatera Utara

LISTING PROGRAM. mainform.vb A-1. Universitas Sumatera Utara A-1 LISTING PROGRAM mainform.vb Imports System.IO Public Class mainform Private Sub mainform_load(byval sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load enkripsirb.checked = True

More information

Santiago Canyon College Computer Science

Santiago Canyon College Computer Science P a g e 1 Santiago Canyon College Computer Science The.Net Threading Model Introduction The purpose of this paper is to introduce you to multi-threading in Visual Studio. Learning how to take advantage

More information

BackgroundWorker Component Overview 1 Multithreading with the BackgroundWorker Component 3 Walkthrough Running an Operation in the Background 10 How

BackgroundWorker Component Overview 1 Multithreading with the BackgroundWorker Component 3 Walkthrough Running an Operation in the Background 10 How BackgroundWorker Component Overview 1 Multithreading with the BackgroundWorker Component 3 Walkthrough Running an Operation in the Background 10 How to Download a File in the Background 15 How to Implement

More information

LAMPIRAN A : LISTING PROGRAM

LAMPIRAN A : LISTING PROGRAM LAMPIRAN A : LISTING PROGRAM 1. Form Utama (Cover) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;

More information

LAMPIRAN A. LISTING PROGRAM

LAMPIRAN A. LISTING PROGRAM 78 LAMPIRAN A. LISTING PROGRAM Form Login.vb Imports MySql Imports MySql.Data Imports MySql.Data.MySqlClient Public Class FormLogIn Private Sub BtnLoginClick(ByVal sender As System.Object, ByVal e As System.EventArgs)

More information

A-1 LISTING PROGRAM. 1. Form1.cs. Universitas Sumatera Utara

A-1 LISTING PROGRAM. 1. Form1.cs. Universitas Sumatera Utara A-1 LISTING PROGRAM 1. Form1.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using IronPython.Hosting; using Microsoft.Scripting;

More information

'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("8b a5-46bb-a6a9-87b4949d1f4c")>

'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid(8b a5-46bb-a6a9-87b4949d1f4c)> LAMPIRAN A : LISTING PROGRAM Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes.

More information

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent()

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent() A-1 LISTING PROGRAM Form Mainform /* * Created by SharpDevelop. * User: Roni Anggara * Date: 5/17/2016 * Time: 8:52 PM * * To change this template use Tools Options Coding Edit Standard Headers. */ using

More information

Revision for Final Examination (Second Semester) Grade 9

Revision for Final Examination (Second Semester) Grade 9 Revision for Final Examination (Second Semester) Grade 9 Name: Date: Part 1: Answer the questions given below based on your knowledge about Visual Basic 2008: Question 1 What is the benefit of using Visual

More information

Else. End If End Sub End Class. PDF created with pdffactory trial version

Else. End If End Sub End Class. PDF created with pdffactory trial version Dim a, b, r, m As Single Randomize() a = Fix(Rnd() * 13) b = Fix(Rnd() * 13) Label1.Text = a Label3.Text = b TextBox1.Clear() TextBox1.Focus() Private Sub Button2_Click(ByVal sender As System.Object, ByVal

More information

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = Label1.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = Label1. į·īįŋ’å•éĄŒ 1-1 Label1 Label1.Text = Label1.Text + 2 į·īįŋ’å•éĄŒ 1-2 Button2 Label1 Label1.Text = Label1.Text+ 2 Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

More information

LAMPIRAN. Universitas Sumatera Utara

LAMPIRAN. Universitas Sumatera Utara LAMPIRAN 1. Modul Imports System.Data Imports System.Data.OleDb Module Module1 Public conn As OleDbConnection Public CMD As OleDbCommand Public DS As New DataSet Public DA As OleDbDataAdapter Public RD

More information

LAMPIRAN A: Listing Program

LAMPIRAN A: Listing Program 67 1. Form Menu Utama LAMPIRAN A: Listing Program Public Class MScreen Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Hide() Form1.Show()

More information

LISTING PROGRAM. % UIWAIT makes pertama wait for user response (see UIRESUME) % uiwait(handles.figure1);

LISTING PROGRAM. % UIWAIT makes pertama wait for user response (see UIRESUME) % uiwait(handles.figure1); LISTING PROGRAM FORM PERTAMA : function varargout = pertama(varargin) gui_singleton = 1; gui_state = struct('gui_name', mfilename,... 'gui_singleton', gui_singleton,... 'gui_openingfcn', @pertama_openingfcn,...

More information

LAMPIRAN A : LISTING PROGRAM

LAMPIRAN A : LISTING PROGRAM 46 LAMPIRAN A : LISTING PROGRAM 1. Mainform /* * Created by SharpDevelop. * User: User7 * Date: 28/09/2015 * Time: 9:38 * * To change this template use Tools Options Coding Edit Standard Headers. */ using

More information

Mr.Khaled Anwar ( )

Mr.Khaled Anwar ( ) The Rnd() function generates random numbers. Every time Rnd() is executed, it returns a different random fraction (greater than or equal to 0 and less than 1). If you end execution and run the program

More information

Form Connection. Imports System Imports System.Threading Imports System.IO.Ports Imports System.ComponentModel

Form Connection. Imports System Imports System.Threading Imports System.IO.Ports Imports System.ComponentModel Form Connection Imports System Imports System.Threading Imports System.IO.Ports Imports System.ComponentModel Public Class connection '------------------------------------------------ Dim myport As Array

More information

LISTING PROGRAM. private void filetoolstripmenuitem_click(object sender, EventArgs e) { this.hide(); Form2 fr = new Form2(); fr.

LISTING PROGRAM. private void filetoolstripmenuitem_click(object sender, EventArgs e) { this.hide(); Form2 fr = new Form2(); fr. Kode Program Form Home namespace SkripsiLagi public partial class Form9 : Form public Form9() LISTING PROGRAM private void filetoolstripmenuitem_click(object sender, EventArgs e) Form2 fr = new Form2();

More information

Lampiran 1 Kode Program

Lampiran 1 Kode Program 53 Lampiran 1 Kode Program Kode Program 1 Kode Menu Peminjaman Private Sub BT_Cari_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT_Cari.Click Call CariKaset() Private Sub RB_CheckedChanged(ByVal

More information

LAMPIRAN LISTING PROGRAM

LAMPIRAN LISTING PROGRAM LAMPIRAN LISTING PROGRAM Imports System Imports System.IO Imports System.Math Public Class frmutama Dim dicari As DirectoryInfo Dim flpath As String, srcpath As String Dim asnode As Double, dsnode As Double,

More information

LISTING PROGRAM. void KOMPRESIToolStripMenuItemClick(object sender, EventArgs e) { Kompresi k = new Kompresi(); k.show(); this.

LISTING PROGRAM. void KOMPRESIToolStripMenuItemClick(object sender, EventArgs e) { Kompresi k = new Kompresi(); k.show(); this. A - 1 LISTING PROGRAM 1. Form Menu Utama using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; namespace KompresiCitra / / Description of MainForm.

More information

LAMPIRAN A-2 : LAPORAN PENJUALAN DOKUMEN KELUARAN

LAMPIRAN A-2 : LAPORAN PENJUALAN DOKUMEN KELUARAN LAMPIRAN A-2 : LAPORAN PENJUALAN DOKUMEN KELUARAN LAMPIRAN A-1 : NOTA DOKUMEN KELUARAN LAMPIRAN B MASUKAN SISTEM BERJALAN LAMPIRAN B-1 : DATA BARANG DOKUMEN MASUKAN LAMPIRAN B-2 : DATA PELANGGAN DOKUMEN

More information

VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS

VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS Intended Learning Objectives Able to build a simple Visual Basic Application. 2 The Sub Statement Private Sub ControlName_eventName(ByVal sender As System.Object,

More information

"!#... )*! "!# )+, -./ 01 $

!#... )*! !# )+, -./ 01 $ Email engauday@hotmail.com! "!#... $ %&'... )*! "!# )+, -./ 01 $ ) 1+ 2#3./ 01 %.. 7# 89 ; )! 5/< 3! = ;, >! 5 6/.?

More information

Objectives. After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism

Objectives. After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism Polymorphism Objectives After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism Definition Polymorphism provides the ability

More information

% --- Executes on button press in btn_gsn. function btn_gsn_callback(hobject, eventdata, handles) GaussianSpeckleNoise close AiSoftware;

% --- Executes on button press in btn_gsn. function btn_gsn_callback(hobject, eventdata, handles) GaussianSpeckleNoise close AiSoftware; A-2 'gui_openingfcn', @AiSoftware_OpeningFcn,... 'gui_outputfcn', @AiSoftware_OutputFcn,... 'gui_layoutfcn', [],... 'gui_callback', []); if nargin && ischar(varargin{1}) gui_state.gui_callback = str2func(varargin{1});

More information

DO NOT COPY AMIT PHOTOSTUDIO

DO NOT COPY AMIT PHOTOSTUDIO AMIT PHOTOSTUDIO These codes are provided ONLY for reference / Help developers. And also SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUERMENT FOR THE AWARD OF BACHELOR OF COMPUTER APPLICATION (BCA) All rights

More information

LISTING PROGRAM. 1. Tampilan Awal. 2. Menu Login. Public Class Awal

LISTING PROGRAM. 1. Tampilan Awal. 2. Menu Login. Public Class Awal LISTING PROGRAM 1. Tampilan Awal Public Class Awal Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick ProgressBar1.Increment(10) If ProgressBar1.Value

More information

LISTING PROGRAM. void FilteringToolStripMenuItemClick(object sender, EventAr s e) { Filtering a = new Filtering(); this.hide(); a.

LISTING PROGRAM. void FilteringToolStripMenuItemClick(object sender, EventAr s e) { Filtering a = new Filtering(); this.hide(); a. 130 LISTING PROGRAM 1. Mainform.cs using System; using System.Drawing; using System.Windows.Forms; namespace AnalisisPerbandinganFilertingdanDeteksiTepi public partial class MainForm : Form public MainForm()

More information

Learning VB.Net. Tutorial 19 Classes and Inheritance

Learning VB.Net. Tutorial 19 Classes and Inheritance Learning VB.Net Tutorial 19 Classes and Inheritance Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you

More information

čķ…éŸģæģĒãƒĒマã‚ŋåˆķåūĄãƒ—ログãƒĐムãŪä―œæˆ (v1.2.1)

čķ…éŸģæģĒãƒĒマã‚ŋåˆķåūĄãƒ—ログãƒĐムãŪä―œæˆ (v1.2.1) čķ…éŸģæģĒãƒĒマã‚ŋåˆķåūĄãƒ—ログãƒĐムãŪä―œæˆ (v1.2.1) 2008 åđī 11 月 28 æ—Ĩ Masaaki MATSUO 構成æПå™Ļ ãƒĒマã‚ŋæœŽä―“ : フã‚ģã‚Ŋ ロマã‚ŋナマã‚Ļãƒģã‚ģマダマ内č”ĩ型čķ…éŸģæģĒãƒĒマã‚ŋ USB-60E ãƒĒマã‚ŋåˆķåūĄéƒĻ : フã‚ģã‚Ŋ ä―į―ŪæąšåˆķåūĄãƒ‰ãƒĐã‚Īバ DCONT-3-60 (SD13) ã‚ģãƒģトロマãƒĐ : Interface 2 čŧļįĩķįļãƒ‘ãƒŦã‚đãƒĒマショãƒģã‚ģãƒģトロマãƒĐ ( į›īį·ščĢœé–“ã‚Ļãƒģã‚ģマダå…Ĩ力 5V)

More information

VARIABLES. 1. STRINGS Data with letters and/or characters 2. INTEGERS Numbers without decimals 3. FLOATING POINT NUMBERS Numbers with decimals

VARIABLES. 1. STRINGS Data with letters and/or characters 2. INTEGERS Numbers without decimals 3. FLOATING POINT NUMBERS Numbers with decimals VARIABLES WHAT IS A VARIABLE? A variable is a storage location in the computer s memory, used for holding information while the program is running. The information that is stored in a variable may change,

More information

S.2 Computer Literacy Question-Answer Book

S.2 Computer Literacy Question-Answer Book S.2 C.L. Half-yearly Examination (2012-13) 1 12-13 S.2 C.L. Question- Answer Book Hong Kong Taoist Association Tang Hin Memorial Secondary School 2012-2013 Half-yearly Examination S.2 Computer Literacy

More information

A-1 LAMPIRAN A LISTING PROGRAM. Kode Program Form Main: Universitas Sumatera Utara

A-1 LAMPIRAN A LISTING PROGRAM. Kode Program Form Main: Universitas Sumatera Utara A-1 LAMPIRAN A A LISTING PROGRAM Kode Program Form Main: #Region Project Attributes #ApplicationLabel: Samuel Panjaitan #VersionCode: 1 #VersionName: #SupportedOrientations: portrait #CanInstallToExternalStorage:

More information

A-1 LISTING PROGRAM. 1. Module1

A-1 LISTING PROGRAM. 1. Module1 A-1 LISTING PROGRAM 1. Module1 Imports System.Data.Odbc Imports System.Data Imports System.Data.SqlClient Imports MySql.Data.MySqlClient Module Module1 Public userid As String Public level As String Public

More information

C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions

C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions Between the comments included with the code and the code itself, you shouldn t have any problems understanding what

More information

CALIFORNIA STATE UNIVERSITY, SACRAMENTO College of Business Administration. MIS 15 Introduction to Business Programming. Programming Assignment 3 (P3)

CALIFORNIA STATE UNIVERSITY, SACRAMENTO College of Business Administration. MIS 15 Introduction to Business Programming. Programming Assignment 3 (P3) CALIFORNIA STATE UNIVERSITY, SACRAMENTO College of Business Administration MIS 15 Introduction to Business Programming Programming Assignment 3 (P3) Points: 50 Due Date: Tuesday, May 10 The purpose of

More information

Interacting with External Applications

Interacting with External Applications Interacting with External Applications DLLs - dynamic linked libraries: Libraries of compiled procedures/functions that applications link to at run time DLL can be updated independently of apps using them

More information

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent() call. //

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent() call. // 1. MainForm.cs using System.Collections.Generic; using System.Drawing; LISTING PROGRAM / / Description of MainForm. / public partial class MainForm : Form public MainForm() The InitializeComponent()

More information

Unit 4. Lesson 4.1. Managing Data. Data types. Introduction. Data type. Visual Basic 2008 Data types

Unit 4. Lesson 4.1. Managing Data. Data types. Introduction. Data type. Visual Basic 2008 Data types Managing Data Unit 4 Managing Data Introduction Lesson 4.1 Data types We come across many types of information and data in our daily life. For example, we need to handle data such as name, address, money,

More information

VB.NET Programs. ADO.NET (insert, update, view records)

VB.NET Programs. ADO.NET (insert, update, view records) ADO.NET (insert, update, view records) VB.NET Programs Database: Student Table : Studtab (adno, name, age, place) Controls: DataGridView, Insert button, View button, Update button, TextBox1 (for Admission

More information

Visual Basic: Opdracht Structuur

Visual Basic: Opdracht Structuur Visual Basic: Opdracht Structuur HoofdMenu.vb SubMenu_Kwadraat.vb Form1.vb Form2.vb Submenu_Som.vb Form3.vb Form4.vb SubMenu_Gem.vb Form5.vb Form6.vb Form10.vb SubMenu_Naam.vb Form7.vb Form11.vb Form8.vb

More information

Final Exam 7:00-10:00pm, April 14, 2008

Final Exam 7:00-10:00pm, April 14, 2008 Name:, (last) (first) Student Number: Section: Instructor: _P. Cribb_ L. Lowther_(circle) York University Faculty of Science and Engineering Department of Computer Science and Engineering Final Exam 7:00-10:00pm,

More information

LISTING PROGRAM. namespace vigenere_des { public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); }

LISTING PROGRAM. namespace vigenere_des { public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); } 59 LISTING PROGRAM Form Utama : using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Navigation;

More information

My first game. 'function which adds objects with bug tag to bugarray array. Saturday, November 23, :06 AM

My first game. 'function which adds objects with bug tag to bugarray array. Saturday, November 23, :06 AM My first game Saturday, November 23, 2013 5:06 AM Public Class Form1 Dim moveright As Boolean = False Dim moveup As Boolean = False Dim moveleft As Boolean = False Dim movedown As Boolean = False Dim score

More information

A-1 LISTING PROGRAM. Halaman Koneksi. Universitas Sumatera Utara

A-1 LISTING PROGRAM. Halaman Koneksi. Universitas Sumatera Utara A-1 LISTING PROGRAM Halaman Koneksi Imports System.Data.OleDb Imports System.Data.OleDb.OleDbCommand Module koneksi Public con As OleDbConnection Public cmd As OleDbCommand Public dtr As OleDbDataReader

More information

In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result.

In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result. Simple Calculator In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result. Let s get started First create a new Visual Basic

More information

LISTING PROGRAM. if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); else gui_mainfcn(gui_state, varargin{:}); end

LISTING PROGRAM. if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); else gui_mainfcn(gui_state, varargin{:}); end A-1 LISTING PROGRAM 1. Form Cover function varargout = cover(varargin) gui_singleton = 1; gui_state = struct('gui_name', mfilename,... 'gui_singleton', gui_singleton,... 'gui_openingfcn', @cover_openingfcn,...

More information

Lampiran 2 MASTER TABEL

Lampiran 2 MASTER TABEL 64 Lampiran 2 MASTER TABEL No. No. Responden Umur Pendidikan Pekerjaan Paritas Kanker 1 427363 35 S1 PNS 4 Tidak 2 504024 36 SMA IRT 4 Tidak 3 500316 35 SMA IRT 5 Tidak 4 504014 35 SMA PNS 1 Tidak 5 447158

More information

(0,0) (600, 400) CS109. PictureBox and Timer Controls

(0,0) (600, 400) CS109. PictureBox and Timer Controls CS109 PictureBox and Timer Controls Let s take a little diversion and discuss how to draw some simple graphics. Graphics are not covered in the book, so you ll have to use these notes (or the built-in

More information

Listing Progam. Universitas Sumatera Utara

Listing Progam. Universitas Sumatera Utara 60 Listing Progam Listing Program Tabel Index

More information

Exam sell. Higher Quality Better Service! Certified IT practice exam authority.

Exam sell. Higher Quality Better Service! Certified IT practice exam authority. Higher Quality Better Service! Exam sell Certified IT practice exam authority Accurate study guides, High passing rate! Exam Sell provides update free of charge in one year! http://www.examsell.com Exam

More information

LAMPIRAN FORM 1 Universitas Sumatera Universitas Utara

LAMPIRAN FORM 1 Universitas Sumatera Universitas Utara LAMPIRAN FORM 1 Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = vbkeyreturn Then Set tbladministrator = New ADODB.Recordset With tbladministrator.open "SELECT * FROM Administrator WHERE userid

More information

1. Create your First VB.Net Program Hello World

1. Create your First VB.Net Program Hello World 1. Create your First VB.Net Program Hello World 1. Open Microsoft Visual Studio and start a new project by select File New Project. 2. Select Windows Forms Application and name it as HelloWorld. Copyright

More information

āđ‚āļ›āļĢāđāļāļĢāļĄāļŠ āļ§āļĒāļ—āļ”āļŠāļ­āļšāļŦāļĄ āļ­āđāļ›āļĨāļ‡āļāļĢāļ°āđāļŠ

āđ‚āļ›āļĢāđāļāļĢāļĄāļŠ āļ§āļĒāļ—āļ”āļŠāļ­āļšāļŦāļĄ āļ­āđāļ›āļĨāļ‡āļāļĢāļ°āđāļŠ āđ‚āļ›āļĢāđāļāļĢāļĄāļŠ āļ§āļĒāļ—āļ”āļŠāļ­āļšāļŦāļĄ āļ­āđāļ›āļĨāļ‡āļāļĢāļ°āđāļŠ 1.āđ€āļĄāļ™ āļ‚āļ­āļ‡āđ‚āļ›āļĢāđāļāļĢāļĄ āļ āļēāļžāļ— 1 āļŦāļ™ āļēāđ€āļĄāļ™ āļ‚āļ­āļ‡āđ‚āļ›āļĢāđāļāļĢāļĄ Public Class frmmain Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

More information

System Analysis and Design

System Analysis and Design System Analysis and Design LAB RECORD-INFS -280/L Information Systems Department University of Nizwa, Sultanate of Oman Table of Contents Task. No: Title Page Nos. Date 1) VB Text box and Message Button

More information

Unit 3. Lesson Designing User Interface-2. TreeView Control. TreeView Contol

Unit 3. Lesson Designing User Interface-2. TreeView Control. TreeView Contol Designing User Interface-2 Unit 3 Designing User Interface-2 Lesson 3.1-3 TreeView Control A TreeView control is designed to present a list in a hierarchical structure. It is similar to a directory listing.

More information

DAFTAR PUSTAKA. Bojic, Paul, 2008, Business Information System. Pearson Education Ltd., England

DAFTAR PUSTAKA. Bojic, Paul, 2008, Business Information System. Pearson Education Ltd., England DAFTAR PUSTAKA Bojic, Paul, 2008, Business Information System. Pearson Education Ltd., England Elib.unikom.ac.id, SQL Server, 27 April 2014. Jogiyanto. 2005. Analisis & Desain Sistem Informasi : Pendekatan

More information

MapWindow Plug-in Development

MapWindow Plug-in Development MapWindow Plug-in Development Sample Project: Simple Path Analyzer Plug-in A step-by-step guide to creating a custom MapWindow Plug-in using the IPlugin interface by Allen Anselmo shade@turbonet.com Introduction

More information

Learning VB.Net. Tutorial 16 Modules

Learning VB.Net. Tutorial 16 Modules Learning VB.Net Tutorial 16 Modules Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it. If

More information

create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) )

create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) ) create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) ) insert into bolumler values(1,'elektrik') insert into bolumler values(2,'makina') insert into bolumler

More information

Lab 3 The High-Low Game

Lab 3 The High-Low Game Lab 3 The High-Low Game LAB GOALS To develop a simple windows-based game named High-Low using VB.Net. You will use: Buttons, Textboxes, Labels, Dim, integer, arithmetic operations, conditionals [if-then-else],

More information

Code: Week 13. Write a Program to perform Money Conversion. Public Class Form1

Code: Week 13. Write a Program to perform Money Conversion. Public Class Form1 Write a Program to perform Money Conversion. Week 13 Code: Public Class Form1 Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Dim a As Double a = TextBox1.Text If ComboBox1.SelectedItem

More information

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init Option Strict On Imports System.Drawing.Imaging Imports System.Drawing Imports System Imports System.Collections Imports System.Configuration Imports System.Data Imports System.IO Imports System.Web Imports

More information

LISTING PROGRAM. PrivateSub KeluarToolStripMenuItem_Click(sender AsObject, e AsEventArgs) Handles KeluarToolStripMenuItem.Click Close() EndSub

LISTING PROGRAM. PrivateSub KeluarToolStripMenuItem_Click(sender AsObject, e AsEventArgs) Handles KeluarToolStripMenuItem.Click Close() EndSub LISTING PROGRAM 1.Tampilan awal PublicClassmm PrivateSub InputDataGuruToolStripMenuItem_Click(sender AsObject, e AsEventArgs) Handles InputDataGuruToolStripMenuItem.Click guru.show() Me.Hide() EndSub PrivateSub

More information

LAMPIRAN DAFTAR PUBLIKASI ILMIAH PENULIS. No Judul Nama Seminar Tempat Tahun 1 Pemanfaatan Fuzzy Logic Dalam menakar Prestasi

LAMPIRAN DAFTAR PUBLIKASI ILMIAH PENULIS. No Judul Nama Seminar Tempat Tahun 1 Pemanfaatan Fuzzy Logic Dalam menakar Prestasi LAMPIRAN DAFTAR PUBLIKASI ILMIAH PENULIS No Judul Nama Seminar Tempat Tahun 1 Pemanfaatan Fuzzy Logic Dalam menakar Prestasi Konferensi Nasional Pengembangan Siswa Sesuai Standar Teknologi Informasi Kompetensi

More information

Programming with Visual Studio Higher (v. 2013)

Programming with Visual Studio Higher (v. 2013) Programming with Visual Studio Higher (v. 2013) Contents/Requirements Checklist Multiple selection: using ifs & case While Loops Using arrays Filling arrays Displaying array contents Types of variables:

More information

PROGRAMMING ASSIGNMENT: MOVIE QUIZ

PROGRAMMING ASSIGNMENT: MOVIE QUIZ PROGRAMMING ASSIGNMENT: MOVIE QUIZ For this assignment you will be responsible for creating a Movie Quiz application that tests the user s of movies. Your program will require two arrays: one that stores

More information

To enter the number in decimals Label 1 To show total. Text:...

To enter the number in decimals Label 1 To show total. Text:... Visual Basic tutorial - currency converter We will use visual studio to create a currency converter where we can convert a UK currency pound to other currencies. This is the interface for the application.

More information

Listing Program. private void exittoolstripmenuitem_click(object sender, EventArgs e) { Application.Exit(); }

Listing Program. private void exittoolstripmenuitem_click(object sender, EventArgs e) { Application.Exit(); } Listing Program Kode Program Menu Home: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using

More information

āļ Microsoft Visual Studio 2008

āļ Microsoft Visual Studio 2008 āļ 58 āļ āļ āļ āļ āļ 58 59 āļ Microsoft Visual Studio 2008 1. DVD āļ MSVS2008 āļ MSVS2008 āļ āļ MSVS2008 āļ āļ 180 DVD DVD āļ MSVS2008 āļ āļ Install Visual Studio 2008 2. āļ āļ āļ āļ āļ Next 3. āļ āļ Options Page āļ Custom āļ

More information

Computing Science Unit 1

Computing Science Unit 1 Computing Science Unit 1 Software Design and Development Programming Practical Tasks Business Information Technology and Enterprise Contents Input Validation Find Min Find Max Linear Search Count Occurrences

More information

A Complete Tutorial for Beginners LIEW VOON KIONG

A Complete Tutorial for Beginners LIEW VOON KIONG I A Complete Tutorial for Beginners LIEW VOON KIONG Disclaimer II Visual Basic 2008 Made Easy- A complete tutorial for beginners is an independent publication and is not affiliated with, nor has it been

More information

...015\Projects\Two_Channel_V1.0\Two_Channel_V1.0\Form1.vb 1

...015\Projects\Two_Channel_V1.0\Two_Channel_V1.0\Form1.vb 1 ...015\Projects\Two_Channel_V1.0\Two_Channel_V1.0\Form1.vb 1 Imports System.IO.Ports Public Class Form1 Dim comport As String Dim receiveddata As String = "" Dim command_app_1 As String = "T,1,500,500>"

More information

Function: function procedures and sub procedures share the same characteristics, with

Function: function procedures and sub procedures share the same characteristics, with Function: function procedures and sub procedures share the same characteristics, with one important difference- function procedures return a value (e.g., give a value back) to the caller, whereas sub procedures

More information

Universitas Sumatera Utara

Universitas Sumatera Utara 43 L A M P I R A N 44 Penulisan Kode Program Aplikasi Game Tetris A. Kode program aplikasi game tetris untuk form1 ( MainF.frm ) adalah sebagai berikut. Dim BANK As Database Dim RS As DAO.Recordset Private

More information

LISTING PROGRAM. % Edit the above text to modify the response to help cover. % Last Modified by GUIDE v Jun :24:43

LISTING PROGRAM. % Edit the above text to modify the response to help cover. % Last Modified by GUIDE v Jun :24:43 A1 LISTING PROGRAM 1. Form Cover function varargout = cover(varargin) COVER MATLAB code for cover.fig COVER, by itself, creates a new COVER or raises the existing singleton*. H = COVER returns the handle

More information

āļ āļēāļ„āļœāļ™āļ§āļ āļ. Source Code

āļ āļēāļ„āļœāļ™āļ§āļ āļ. Source Code āļ āļēāļ„āļœāļ™āļ§āļ āļ āļēāļ„āļœāļ™āļ§āļ āļ. Source Code 154 155 Source Code āļŠ āļ­ Empbook Option Explicit On Option Strict On Imports System.data Imports System.Data.OleDb Public Class Empbook Dim Book_status As Integer = 1 'ęğŀşÄūłŀăăő

More information

WEEK 1. Event: Tick: Occurs when the specified timer interval has elapsed and the timer is enabled.

WEEK 1. Event: Tick: Occurs when the specified timer interval has elapsed and the timer is enabled. WEEK 1 Timer: A Timer is used to raise an event at user-defined intervals. It is optimized for use in Windows Forms applications. Timer is used to control and manage events that are time related. For example:

More information

LAMPIRAN LISTING PROGRAM

LAMPIRAN LISTING PROGRAM A1 LAMPIRAN LISTING PROGRAM Prototype.m function varargout = prototype(varargin) gui_singleton = 1; gui_state = struct('gui_name', mfilename,... 'gui_singleton', gui_singleton,... 'gui_openingfcn', @prototype_openingfcn,...

More information

UNIT-3. Prepared by R.VINODINI 1

UNIT-3. Prepared by R.VINODINI 1 Prepared by R.VINODINI 1 Prepared by R.VINODINI 2 Prepared by R.VINODINI 3 Prepared by R.VINODINI 4 Prepared by R.VINODINI 5 o o o o Prepared by R.VINODINI 6 Prepared by R.VINODINI 7 Prepared by R.VINODINI

More information

VISUAL BASIC PROGRAMMING (44) Technical Task KEY. Regional 2013 TOTAL POINTS (485)

VISUAL BASIC PROGRAMMING (44) Technical Task KEY. Regional 2013 TOTAL POINTS (485) 5 Pages VISUAL BASIC PROGRAMMING (44) Technical Task KEY Regional 2013 TOTAL POINTS (485) Graders: Please double-check and verify all scores! Property of Business Professionals of America. May be reproduced

More information

Private Sub MenuUtamaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.ShowDialog() End Sub

Private Sub MenuUtamaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.ShowDialog() End Sub LISTING PROGRAM Menu_Utama.vb Public Class FrmUtama Private Sub DataMovieToolStripMenuItem_Click(ByVal sender As DataMovieToolStripMenuItem.Click FrmMovie.ShowDialog() Private Sub DataPeminjamToolStripMenuItem_Click(ByVal

More information

Learning VB.Net. Tutorial 10 Collections

Learning VB.Net. Tutorial 10 Collections Learning VB.Net Tutorial 10 Collections Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it.

More information

LISTING PROGRAM. frmmenu.vb. frmlogin.vb. Universitas Sumatera Utara. Public Class frmmenu

LISTING PROGRAM. frmmenu.vb. frmlogin.vb. Universitas Sumatera Utara. Public Class frmmenu LISTING PROGRAM frmmenu.vb Public Class frmmenu Private Sub QuitToolStripMenuItem_Click(ByVal sender As QuitToolStripMenuItem.Click Close() Private Sub OtoritasToolStripMenuItem_Click(ByVal sender As OtoritasToolStripMenuItem.Click

More information

Herefordshire College of Technology Centre Edexcel BTEC Level 3 Extended Diploma in Information Technology (Assignment 1 of 3)

Herefordshire College of Technology Centre Edexcel BTEC Level 3 Extended Diploma in Information Technology (Assignment 1 of 3) Student: Candidate Number: Assessor: Len Shand Herefordshire College of Technology Centre 24150 Edexcel BTEC Level 3 Extended Diploma in Information Technology (Assignment 1 of 3) Course: Unit: Title:

More information

Kartu Bimbingan Tugas Akhir Mahasiswa

Kartu Bimbingan Tugas Akhir Mahasiswa KEMENTRIAN PENDIDIKAN DAN KEBUDAYAAN UNIVERSITAS SUMATERA UTARA FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM Jln. Bioteknologi No. 1 Kampus USU Padang Bulan Medan-20155 Telp. (061) 8214290, 8211212, 8211414

More information

LISTING CODE A-1. Indo_to_jawa_Fragments.java. package studio.arti.kamusjawaindonesia;

LISTING CODE A-1. Indo_to_jawa_Fragments.java. package studio.arti.kamusjawaindonesia; LISTING CODE A-1 Indo_to_jawa_Fragments.java package studio.arti.kamusjawaindonesia; import android.content.dialoginterface; import android.database.cursor; import android.database.sqlite.sqlitedatabase;

More information

Inheriting Windows Forms with Visual C#.NET

Inheriting Windows Forms with Visual C#.NET Inheriting Windows Forms with Visual C#.NET Overview In order to understand the power of OOP, consider, for example, form inheritance, a new feature of.net that lets you create a base form that becomes

More information

Unit 4 Advanced Features of VB.Net

Unit 4 Advanced Features of VB.Net Dialog Boxes There are many built-in dialog boxes to be used in Windows forms for various tasks like opening and saving files, printing a page, providing choices for colors, fonts, page setup, etc., to

More information

Learning VB.Net. Tutorial 15 Structures

Learning VB.Net. Tutorial 15 Structures Learning VB.Net Tutorial 15 Structures Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it.

More information

Code: Write a Program for perform Money Conversion. Public Class Form1

Code: Write a Program for perform Money Conversion. Public Class Form1 Write a Program for perform Money Conversion. Code: Public Class Form1 Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim a As Double a = TextBox1.Text

More information

Menus, Common Dialog Controls, Context Menus, Sub Procedures, and Functions

Menus, Common Dialog Controls, Context Menus, Sub Procedures, and Functions 5-menus.htm; updated September 12, 2011 Menus, Common Dialog Controls, Context Menus, Sub Procedures, and Functions Coverage: This chapter covers several important topics: (1) use of menus and context

More information

DFL168A.net Component Dafulai Electronics

DFL168A.net Component Dafulai Electronics 2 Table of Contents I Features Highlights 7 II How to install DFL168A Component? 7 III How to use the component? 10 IV Enumeration 23 V DFL168A Class 23 1 Properties... 23 2 Members... 24 3 Event... 24

More information

Event-based Asynchronous Pattern Overview 1 Implementing the Event-based Asynchronous Pattern 5 Deciding When to Implement the Event-based

Event-based Asynchronous Pattern Overview 1 Implementing the Event-based Asynchronous Pattern 5 Deciding When to Implement the Event-based Event-based Asynchronous Pattern Overview 1 Implementing the Event-based Asynchronous Pattern 5 Deciding When to Implement the Event-based Asynchronous Pattern 12 Implementing Component with the Event-based

More information

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent()

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent() A- 1 LISTING PROGRAM Form1.cs (Pengirim) /* * Created by SharpDevelop. * User: Lia * Date: 3/13/2017 * Time: 9:43 PM * * To change this template use Tools Options Coding Edit Standard Headers. */ using

More information

(Subroutines in Visual Basic)

(Subroutines in Visual Basic) Ch 7 Procedures (Subroutines in Visual Basic) Visual Basic Procedures Structured Programs To simplify writing complex programs, most Programmers (Designers/Developers) choose to split the problem into

More information