Thursday, October 27, 2011

Color Recognition ( Pengenalan Warna )





Terms of Problem:

1. At the time the form is run then display a black background with the color settings for thetextbox & HFFFF80
2. Menu option is used to modify the shape and color of text in the textbox 2. Menu optionis used to modify the shape and color of text in the textbox
3. clean button is used to clean the display 3. clean button is used to clean the display
4. exit button is used to exit the program without the messagebox 4. exit button is used toexit the program without the messagebox

Ketentuan Soal :

1. Pada saat form dijalankan tampilan background berwarna hitam kemudian untuk textbox dengan pengaturan warna &HFFFF80 1. At the time the form is run then display a black background with the color settings for the textbox & HFFFF80
2. Menu pilihan digunakan untuk memodifikasi bentuk dan warna tulisan di dalam textbox 2. Menu option is used to modify the shape and color of text in the textbox
3. tombol bersih digunakan untuk membersihkan tampilan 3. clean button is used to clean the display
4. tombol keluar digunakan untuk keluar program tanpa messagebox 4. exit button is used to exit the program without the messagebox



Listing Program :

Private Sub Cmdbersih_Click()
Txthasil = ""
Txthasil.SetFocus
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub Form_Load()
Form1.BackColor = vbBlack
Txthasil.BackColor = &HFFFF80
End Sub

Private Sub Optblue_Click()
Txthasil.ForeColor = vbBlue
End Sub

Private Sub Optbold_Click()
Txthasil.FontBold = True
Txthasil.FontUnderline = False
Txthasil.FontItalic = False
End Sub

Private Sub Optitalic_Click()
Txthasil.FontItalic = True
Txthasil.FontBold = False
Txthasil.FontUnderline = False
End Sub

Private Sub Optred_Click()
Txthasil.ForeColor = vbRed
End Sub

Private Sub Optunder_Click()
Txthasil.FontUnderline = True
Txthasil.FontBold = False
Txthasil.FontItalic = False
End Sub

Private Sub Optyellow_Click()
Txthasil.ForeColor = vbYellow
End Sub


Thanks..enjoy it..ganbatte.. ^_^

No comments:

Post a Comment