Proses :
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim fx, x As Integer
x = -1
fx = Val(2 * x ^ 4 - x ^ 2 + 2 * x - x - 1)
While (fx) > 0.001
x = x + 0.001
fx = Val(2 * x ^ 4 - x ^ 2 + 2 * x - x - 1)
End While
ListBox1.Items.Add(fx)
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
End Sub
End Class
Proses :
Public Class Form1
Dim KODE As Object
Sub bersih(ByVal f As Form)
Dim x As Object
For Each x In f.Controls
If TypeOf x Is TextBox Then x.text = ""
Next
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
th()
ur()
jenjang()
End Sub
Sub th()
Dim i As Integer
For i = 2005 To 2011
ComboBox1.Items.Add(i)
Next
End Sub
Sub ur()
Dim i As Integer
For i = 100 To 536
ComboBox3.Items.Add(i)
Next
End Sub
Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox3.SelectedIndexChanged
ComboBox4.Text = (Microsoft.VisualBasic.Right(ComboBox1.Text, 2) & KODE & Microsoft.VisualBasic.Left(ComboBox3.Text, 3))
Dim q As Integer
For q = 100 To 250
ComboBox4.Items.Add(Microsoft.VisualBasic.Right(ComboBox1.Text, 2) & KODE & q)
Next
End Sub
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
If ComboBox2.Text = "s1" Then
KODE = 11
Else
KODE = "02"
End If
ComboBox4.Text = (Microsoft.VisualBasic.Right(ComboBox1.Text, 2) & KODE)
End Sub
Sub jenjang()
ComboBox2.Items.Add("S1")
ComboBox2.Items.Add("D3")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
bersih(Me)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim x As Object
x = MsgBox("anda mau keluar??", vbQuestion + vbYesNo, "info")
If x = vbYes Then
Me.Close()
End If
End Sub
End ClassShare
Sabtu, 05 November 2011
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar