Tutorial Membuat Aplikasi Sederhana VB.NET

Pada tutorial kali ini adalah kita akan membuat aplikasi sederhana.
Dari merubah font menjadi bold , underline , italic lalu merubah font color dan sizenya dll.
  1. Buatlah rancangan form dengan menggunakan Windows Forms seperti gambar dibawah ini :

Rancangan form ini terdiri dari 1 Form , 10 Button , dan 1 buah label dengan properties sebagai berikut :
 1. Form1
  • Name = Form1
  • Text = Form1
2. Label1
  • Name = label1
  • Font = Microsoft Sans Serif Size = 14, FontStyle : Reguler
  • Text = AWAL BELAJAR VB.NET
  • Border Style = FixedSingle
  • AutoSize = False
3. Button1
  • Name = button1
  • Text = B
  • Font = Microsoft Sans Serif Size = 8 , FontStyle : Bold
4. Button2
  • Name = button2
  • Text = U
  • Font = Microsoft Sans Serif Size = 8 , FontStyle : Underline
5. Button3
  • Name = button3
  • Text = I
  • Font = Microsoft Sans Serif Size = 8 , FontStyle : Italic
6. Button4
  • Name = button4
  • Text = FONT COLOR
7. Button5
  • Name = button5
  • Text = FONT SIZE
8. Button6
  • Name = button6
  • Text = TOP CENTER
9. Button7
  • Name = button7
  • Text = BOTTOM CENTER
10. Button8
  • Name = button8
  • Text = TEXT FORM
11. Button9
  • Name = button9
  • Text = NORMAL
12. Button10
  • Name = button10
  • Text = Exit
Setelah membuat rancangan diatas silahkan PAHAMI CODE berikut , lalu masukan dan coba :
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Label1.Font = New System.Drawing.Font(Label1.Font(), FontStyle.Bold)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Label1.Font = New System.Drawing.Font(Label1.Font(), FontStyle.Underline)
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Label1.Font = New System.Drawing.Font(Label1.Font(), FontStyle.Italic)
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Label1.ForeColor = Color.Blue
'Label1.ForeColor = System.Drawing.Color.Blue
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
Label1.Font = New System.Drawing.Font("Arial", 20)
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
Label1.TextAlign = ContentAlignment.TopCenter
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
Label1.TextAlign = ContentAlignment.BottomCenter
End Sub
Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
Form1.ActiveForm.Text = "Visual VB.net"
End Sub
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 14, FontStyle.Regular)
Label1.TextAlign = ContentAlignment.MiddleCenter
Label1.ForeColor = System.Drawing.Color.Black
End Sub
Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click
Me.Dispose()
End
End Sub
End Class
Berikut Tutorial Pembuatannya :


Semoga membantu :) untuk pertanyaan bisa langsung ditanyakan dikolom komentar , terimakasih.

Share this

Related Posts

Previous
Next Post »

Berkomentar lah dengan bijak , bila ada konten ada kesalahan dalam konten mohon berkomentar dengan sewajarnya. Terimakasih