Kadangkala orang yang paling mencintaimu adalah orang yang tak pernah menyatakan cintanya padamu kerana orang itu takut kau berpaling dan menjauhinya.. Dan bila di suatu masa hilang dari pandanganmu,,kau akan menyadari dia adalah cinta yang tidak pernah kau sadari….

Rabu, 30 Maret 2011

membuat Design Akademik Mahasiswa vb.net 2008

1. Design Akademik Mahasiswa

2. Sintaknya

Public class form1

Dim isiText(4) As String

Dim milis As ListViewItem

Private sub form1....

Call Bersih ( )

Call isi Combo ( )

Call Tampilan ( )

End Sub

Private sub Form1...

End sub

Sub Bersih ( )

TextBox1.Text = “

TextBox2.Text = “

TextBox3.Text = “

ComboBox1.Text = “ 06 Teknik Informatika “

End sub

Sub isi Combo ( )

ComboBox1.Items.Add (“06 Teknik Informatika”)

ComboBox1.Items.Add (“07 Sistem Informatika”)

ComboBox1.Items.Add (“67 Komputer Akuntansi”)

ComboBox1.Items.Add (“05 Teknik Komputer”)

ComboBox1.Items.Add (“26 Managemen Informatika”)

End sub

Private sub Buton1_click....

If Button1.Text = “Tambah” then

Button1.Text = “Simpan”

Button2.Enabled = False

Button3.Enabled = False

Button4.Text = “Batal”

TextBox1.Focus ( )

Else

Isi Text(0) =trim (TextBox1.Text)

Isi Text(1)=trim (TextBox2.Text)

Isi Text(2)=trim (TextBox3.Text)

Isi Text(3)=Microsoft.Visual Basic.Left(trim (ComboBox1.Text),2)

Milis = New ListView Item (isiText)

ListView1.Items .Add (Milis)

Call Bersih( )

TextBox1. Focus( )

End If

End sub

Private sub Botton4_click

If Button4.Text = “Keluar” Then

Me. Close( )

Else

Call Bersih ( )

Call Normal ( )

End If

End sub

Sub Normal ( )

Button1.Text = “Tambah”

Button1.Enabled = True

Button2.Text = “Ubah”

Button2.Enabled = True

Button3.Text = “Hapus”

Button3.Enabled = True

Button4.Text = “Keluar”

End sub

Private sub Button2_click

If Button2.Text = “Ubah” Then

Button2.Text = “Simpan”

Button3.Enabled = False

Button1.Enabled = False

Button4.Text = “Batal”

TextBox1. Focus( )

Else

End If

End sub

Private sub Button3_click

If Button3.Text = “Hapus” Then

Button3.Text = “ok”

Button1.Enabled = False

Button2.Enabled = False

Button4.Text = “Batal”

End If

End sub

Sub Tampilan ( )

ListView1.View = View.Details

ListView1.Columns.Add(“NPM”,100,Horizontal Alignment.Center)

ListView1.Columns.Add(“Nama”,100,Horizontal Alignment.Left)

ListView1.Columns.Add(“Alamat”,100,Horizontal Alignment.Left)

ListView1.Columns.Add(“Jurusan”,200,Horizontal Alignment.Left)

End sub

Private sub ListView1_Item Selection Changed

TextBox1.Text =e.Item.Text

End sub

Private sub ListView1_Selected Index Change

End sub

Private sub TextBox1_KeyPress

TextBox1.Focus( )

End sub

Private sub TextBox2_Text Changed

End sub

End class

3. Di RUNNING Programnya

Senin, 21 Maret 2011

Visual Basic .net 2008 Tahapan Membuat Puzzle

lakukan setting di bagian properties object seperti berikut :

Button1

Visible = false

Button 2

Teks = 4

Button 3

Teks = 2

Button 4

Teks = 7

Button 5

Teks = 6

Button 6

Teks = 1

Button 7

Teks = 3

Button 8

Teks = 8

Button 9

Teks = 5

Hasilnya akan seperti berikut :

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQYeJ-agsPBSPjhoG52SopBp_JvCNaFjqiputTsIG4HninPchFz86blZe_EUX52E7xuRGWJpCePSC5YlJr0VIm5EnDy9MLnWxx6RpDnLZDp-Y-DG1Hvi1GJQKdHEqCAK8uigjqp-VoCyyb/s1600/untitled.bmp



Lalu masukkan syntax berikut :

Public Class Puzzle

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

If Button2.Visible = False Then

Button2.Visible = True

Button1.Visible = False

Button2.Text = Button1.Text

Else

If Button4.Visible = False Then

Button4.Visible = True

Button1.Visible = False

Button4.Text = Button1.Text

End If

End If

cek()

End Sub

Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click

If Button1.Visible = False Then

Button1.Visible = True

Button2.Visible = False

Button1.Text = Button2.Text

ElseIf Button3.Visible = False Then

Button3.Visible = True

Button2.Visible = False

Button3.Text = Button2.Text

ElseIf Button5.Visible = False Then

Button5.Visible = True

Button2.Visible = False

Button5.Text = Button2.Text

End If

cek()

End Sub

Private Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click

If Button2.Visible = False Then

Button2.Visible = True

Button3.Visible = False

Button2.Text = Button3.Text

Else

If Button6.Visible = False Then

Button6.Visible = True

Button3.Visible = False

Button6.Text = Button3.Text

End If

End If

cek()

End Sub

Private Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click

If Button1.Visible = False Then

Button1.Visible = True

Button4.Visible = False

Button1.Text = Button4.Text

ElseIf Button5.Visible = False Then

Button5.Visible = True

Button4.Visible = False

Button5.Text = Button4.Text

ElseIf Button7.Visible = False Then

Button7.Visible = True

Button4.Visible = False

Button7.Text = Button4.Text

End If

cek()

End Sub

Private Sub Button6_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button6.Click

If Button3.Visible = False Then

Button3.Visible = True

Button6.Visible = False

Button3.Text = Button6.Text

ElseIf Button9.Visible = False Then

Button9.Visible = True

Button6.Visible = False

Button9.Text = Button6.Text

ElseIf Button5.Visible = False Then

Button5.Visible = True

Button6.Visible = False

Button5.Text = Button6.Text

End If

cek()

End Sub

Private Sub Button8_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button8.Click

If Button7.Visible = False Then

Button7.Visible = True

Button8.Visible = False

Button7.Text = Button8.Text

ElseIf Button9.Visible = False Then

Button9.Visible = True

Button8.Visible = False

Button9.Text = Button8.Text

ElseIf Button5.Visible = False Then

Button5.Visible = True

Button8.Visible = False

Button5.Text = Button8.Text

End If

cek()

End Sub

Private Sub Button7_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button7.Click

If Button8.Visible = False Then

Button8.Visible = True

Button7.Visible = False

Button8.Text = Button7.Text

Else

If Button4.Visible = False Then

Button4.Visible = True

Button7.Visible = False

Button4.Text = Button7.Text

End If

End If

cek()

End Sub

Private Sub Button9_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button9.Click

If Button6.Visible = False Then

Button6.Visible = True

Button9.Visible = False

Button6.Text = Button9.Text

Else

If Button8.Visible = False Then

Button8.Visible = True

Button9.Visible = False

Button8.Text = Button9.Text

End If

End If

cek()

End Sub

Private Sub Button5_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button5.Click

If Button2.Visible = False Then

Button2.Visible = True

Button5.Visible = False

Button2.Text = Button5.Text

ElseIf Button4.Visible = False Then

Button4.Visible = True

Button5.Visible = False

Button4.Text = Button5.Text

ElseIf Button6.Visible = False Then

Button6.Visible = True

Button5.Visible = False

Button6.Text = Button5.Text

ElseIf Button8.Visible = False Then

Button8.Visible = True

Button5.Visible = False

Button8.Text = Button5.Text

End If

cek()

End Sub

Private Sub cek()

If (Button1.Text = "1" And Button2.Text = "2" And Button3.Text = "3" And Button4.Text = "4") Then

If (Button5.Text = "5" And Button6.Text = "6" And Button7.Text = "7") Then

If (Button8.Text = "8") Then

MessageBox.Show("Selesai")

End If

End If

End If

End Sub

End Class