Pada program ini anda dapat melihat perubahan warna yang ada di Form. Untuk menjalankannya anda dapat mengikuti langkah-langkah berikut
1) Tampilkan terlebih dahulu sebuah Form dengan cara membuka
aplikasi Microsoft Visual Studio 2010 dan pilih menu File - New Project -
Visual Basic -Windows Forms Application - OK. Setelah itu akan muncul Form
seperti dibawah ini
2) Untuk program ini anda tidak perlu menambah apapun didalam Form hanya saja perlu doule klik di "Form" untuk memasukkan linsting program berkut
Imports System.Drawing.Drawing2D
Public Class Form9
Dim Random As Random = New Random
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
Dim G As Graphics = e.Graphics
G.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
For B As Byte = 1 To 10
Dim Posisi As Integer = 0
For A As Integer = 300 To 2 Step -2
Dim Warna As New Pen(Color.FromArgb(Random.Next(200, 255),
Random.Next(255), Random.Next(255), Random.Next(255)), 3)
G.DrawRectangle(Warna, Posisi + 5, Posisi + 5, A, A)
Posisi += 1
For X As Single = 0 To 400000
Next
Next
Next
End Sub
End Class
3) Dan untuk menjalankan program anda harus memilih "Start Debugging" atau menekan "F5" pada
tombol keyboard. Hasil pun akan terlihat seperti tampilan dibawah ini
4) Selesai
#Selamat mencoba dan semoga berhasil :)
Best suppliers of metal - TITanium-Arts.com
BalasHapusTitsanium-Arts.com, the leading ford edge titanium supplier of metal titanium strength products, manufactures quality and premium products. black titanium wedding bands Founded in 1997, the company gold titanium alloy supplies high-quality t fal titanium pan