Jumat, 21 Oktober 2016


houston mesothelioma lawyers mesothelioma attorneys los angeles malignant mesothelioma pleural rate survival delaware mesothelioma lawyers asbestos attorneys philadelphia missouri mesothelioma lawyers mesothelioma lawyers houston asbestos lawyers los angeles illinois mesothelioma lawyers houston mesothelioma attorney colorado mesothelioma lawyers mesothelioma attorneys san diego georgia mesothelioma lawyer asbestos law suits mesothelioma attorneys california california mesothelioma attorneys detroit personal injury attorney student loan consilidation fort worth dwi lawyer tennessee mesothelioma lawyer diffuse malignant pleural mesothelioma irs debt attorney applied foundation mesothelioma research dallas dwi lawyers oklahoma city personal injury attorney mesothelioma lawyers california hawaii car accident lawyer houston dwi attorney mesothelioma applied research foundation houston mesothelioma mesothelioma houston michigan personal injury lawyer ca car donations car donations ca california mesothelioma lawyers wrongful death attorney los angeles illinois mesothelioma attorney dui attorneys los angeles los angeles dui attorneys college student loan consolidation mesothelioma washington attorney washington mesothelioma attorney mesothelioma attorney ohio ohio mesothelioma attorney georgia mesothelioma lawyers colorado mesothelioma attorneys asbestos law firm oklahoma personal injury attorney colorado accident lawyers michigan personal injury attorney

Visual Basic: Membuat Background Form Berubah Warna Secara Random

Sudah lama rasanya saya tidak membagi tips mengenai visual basic. Nah untuk kali ini saya akan membagikan cara bagaimana membuat background pada form visual basic (vb 6) menjadi berubah-ubah warna (warna-warni). Jadi nanti seperti random (acak) sistemnya. Okey langsung saja, lihat caranya di bawah ini:

1. Desain form seperti di bawah ini:

Visual Basic: Membuat Background Form Berubah Warna Secara Random

2. Masukan komponen Timer sebanyak 2 buah dan Label sebanyak 1 buah
3. Ubah properties name pad aform => formimaniawan
4. Ubah properties interval pada kedua Timer => 100
5. Isikan coding di bawah ini (perhatikan nama komponennya)
Private Sub Form_Load()
Timer2.Enabled = True
Randomize
formimaniawan.BackColor = Rnd(&H80000009)
End Sub
Private Sub Timer1_Timer()
formimaniawan.Visible = True
formimaniawan.Enabled = True
formimaniawan.BackColor = QBColor(Rnd * 1)
formimaniawan.BackColor = QBColor(Rnd + 2)
formimaniawan.BackColor = QBColor(Rnd + 3)
formimaniawan.BackColor = QBColor(Rnd + 4)
formimaniawan.BackColor = QBColor(Rnd + 5)
formimaniawan.BackColor = QBColor(Rnd + 6)
formimaniawan.BackColor = QBColor(Rnd + 7)
End Sub
Private Sub Timer2_Timer()
formimaniawan.Visible = True
formimaniawan.BackColor = QBColor(Rnd * 8)
End Sub
Semoga Bermanfaat


EmoticonEmoticon