Tuesday, 15 April 2014
Program Mencampur Warna Standar RGB Di VB
Listing VB dibawah ini:
Private Sub Command1_Click()
On Error Resume Next
Picture4.BackColor = RGB(Text1.Text, Text2.Text, Text3.Text)
Text4.Text = ("&text1.text, &text2.text, &text3.text")
Text1.SetFocus
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Picture1.BackColor = &H8000000F
Picture2.BackColor = &H8000000F
Picture3.BackColor = &H8000000F
Picture4.BackColor = &H8000000F
Text1.SetFocus
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Command4_Click()
Text5.Text = "GHOFAR AFROZI"
Text6.Text = "122077"
Text7.Text = "D TEKNIK INFORMATIKA"
End Sub
Private Sub Command5_Click()
CommonDialog1.Filter = "JPG|*.jpg"
CommonDialog1.ShowOpen
Picture5.Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub form_activate()
Text1.SetFocus
End Sub
Private Sub form_load()
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
End Sub
Private Sub text1_change()
On Error Resume Next
If Text1.Text = "" Then
Picture1.BackColor = &H8000000F
End If
If Val(Text1.Text) > 255 Then
MsgBox "Nilai yang anda input melebihi jangkauan, yaitu 255", vbOKOnly + vbCritical, "Konfirmasi"
Picture1.BackColor = &H8000000F
Text1.Text = ""
Text1.SetFocus
ElseIf Val(Text1.Text) <= 255 Then
Picture1.BackColor = RGB(Text1.Text, &O0, &O0)
End If
End Sub
Private Sub text2_change()
On Error Resume Next
If Text1.Text = "" Then
Picture1.BackColor = &H8000000F
End If
If Val(Text2.Text) > 255 Then
MsgBox "Nilai yang anda input melebihi jangkauan, yaitu 255", vbOKOnly + vbCritical, "Konfirmasi"
Picture2.BackColor = &H8000000F
Text2.Text = ""
Text2.SetFocus
ElseIf Val(Text2.Text) <= 255 Then
Picture2.BackColor = RGB(&O0, Text2.Text, &O0)
End If
End Sub
Private Sub text3_change()
On Error Resume Next
If Text1.Text = "" Then
Picture1.BackColor = &H8000000F
End If
If Val(Text3.Text) > 255 Then
MsgBox "Nilai yang anda input melebihi jangkauan, yaitu 255", vbOKOnly + vbCritical, "Konfirmasi"
Picture3.BackColor = &H8000000F
Text3.Text = ""
Text3.SetFocus
ElseIf Val(Text3.Text) <= 255 Then
Picture3.BackColor = RGB(&O0, &O0, Text3.Text)
End If
End Sub
Private Sub text3_lostfocus()
If Text3.Text <> "" Then
Command1.SetFocus
End If
End Sub
HTML Lists
Listing HTML dibawah ini:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> Tugas 1 </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<ol type='I'>
<li>ANALISIS SISTEM</li>
</ol>
<ol>
<dd><li>Aliran Dokumen Sistem Berjalan</li></dd>
<dd><li>Aliran Dokumen Sistem Yang Diusulkan</li></dd>
</ol>
<ol type='I' start='2'>
<dt><li>DESAIN SISTEM</li><dt>
</ol>
<ol type='A'>
<dd><li>Tekanan-Tekanan Dalam Sistem</li></dd>
<dd><li>Desain Model</li></dd>
</ol>
<blockquote>
<ul type='disc'>
<dd><li>Diagram Konteks</li></dd>
<dd><li>Diagram Berjenjang</li></dd>
<dd><li>Diagram Arus Data</li></dd>
<dd><li>Kamus Data</li></dd>
</blockquote>
<ol type='A' start='3'>
<dd><li>Desain Output</li></dd>
<dd><li>Desain Input</li></dd>
<dd><li>Desain Basis Data</li></dd>
</ol>
<blockquote>
<ol type='a'>
<dd><li>Entity Relationship Diagram</li></dd>
<dd><li>Transformasi ERD Ke Basis Data</li></dd>
<dd><li>Struktur Tabel</li></dd>
</ol>
</blockquote>
<ol type='A' start='6'>
<dd><li>Desain Proses</li></dd>
<dd><li>Desain Teknologi</li></dd>
</ol>
<hr>
© GHOFAR AFROZI (122077)
</body>
</html>
<html>
<head>
<title> Tugas 1 </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<ol type='I'>
<li>ANALISIS SISTEM</li>
</ol>
<ol>
<dd><li>Aliran Dokumen Sistem Berjalan</li></dd>
<dd><li>Aliran Dokumen Sistem Yang Diusulkan</li></dd>
</ol>
<ol type='I' start='2'>
<dt><li>DESAIN SISTEM</li><dt>
</ol>
<ol type='A'>
<dd><li>Tekanan-Tekanan Dalam Sistem</li></dd>
<dd><li>Desain Model</li></dd>
</ol>
<blockquote>
<ul type='disc'>
<dd><li>Diagram Konteks</li></dd>
<dd><li>Diagram Berjenjang</li></dd>
<dd><li>Diagram Arus Data</li></dd>
<dd><li>Kamus Data</li></dd>
</blockquote>
<ol type='A' start='3'>
<dd><li>Desain Output</li></dd>
<dd><li>Desain Input</li></dd>
<dd><li>Desain Basis Data</li></dd>
</ol>
<blockquote>
<ol type='a'>
<dd><li>Entity Relationship Diagram</li></dd>
<dd><li>Transformasi ERD Ke Basis Data</li></dd>
<dd><li>Struktur Tabel</li></dd>
</ol>
</blockquote>
<ol type='A' start='6'>
<dd><li>Desain Proses</li></dd>
<dd><li>Desain Teknologi</li></dd>
</ol>
<hr>
© GHOFAR AFROZI (122077)
</body>
</html>
Subscribe to:
Posts (Atom)