Ayyıldız2 | 2008 TR Yapısı • 1-99 Orta Emek Destan • Oto Avsız • 10 Temmuz 21:00 HEMEN TIKLA!
listboxla ilgili güzel bir örnek
Private Sub Command1_Click()
Dim sayi1 As Integer
Dim sayi2 As Integer
Dim sayi3 As Integer
Dim sayi4 As Integer
Dim sayi5 As Integer
Dim sayi6 As Integer
sayi1 = Val(Text1.Text)
sayi2 = Val(Text2.Text)
sayi3 = Val(Text3.Text)
sayi4 = Val(Text4.Text)
sayi5 = Val(Text5.Text)
sayi6 = Val(Text6.Text)
Select Case List1.ListIndex
Case o
ort = (sayi1 + sayi2 + sayi4) / 3
Case 1
ort = (sayi1 + sayi2 + sayi4 + sayi5) / 4
Case 2
ort = (sayi1 + sayi2 + sayi3 + sayi4 + sayi5) / 5
Case 3
ort = (sayi1 + sayi2 + sayi3 + sayi4 + sayi5 + sayi6) / 6
End Select
Label8.Caption = ort
End Sub
Private Sub Form_Load()
List1.AddItem "2 sınav 1sözlü"
List1.AddItem "2 sınav 2 sözlü"
List1.AddItem "3 sınav 2 sözlü"
List1.AddItem "3 sınav 3 sözlü"
End Sub
Private Sub List1_Click()
Select Case List1.ListIndex
Case 0
Label1.Visible = True
Text1.Visible = True
Label2.Visible = True
Text2.Visible = True
Label3.Visible = False
Text3.Visible = False
Label4.Visible = True
Text4.Visible = True
Label5.Visible = False
Text5.Visible = False
Label6.Visible = False
Text6.Visible = False
Case 1
Label1.Visible = True
Text1.Visible = True
Label2.Visible = True
Text2.Visible = True
Label3.Visible = False
Text3.Visible = False
Label4.Visible = True
Text4.Visible = True
Label5.Visible = True
Text5.Visible = True
Label6.Visible = False
Text6.Visible = False
Case 2
Label1.Visible = True
Text1.Visible = True
Label2.Visible = True
Text2.Visible = True
Label3.Visible = True
Text3.Visible = True
Label4.Visible = True
Text4.Visible = True
Label5.Visible = True
Text5.Visible = True
Label6.Visible = False
Text6.Visible = False
Case 3
Label1.Visible = True
Text1.Visible = True
Label2.Visible = True
Text2.Visible = True
Label3.Visible = True
Text3.Visible = True
Label4.Visible = True
Text4.Visible = True
Label5.Visible = True
Text5.Visible = True
Label6.Visible = True
Text6.Visible = True
End Select
End Sub
Private Sub Command1_Click()
Dim sayi1 As Integer
Dim sayi2 As Integer
Dim sayi3 As Integer
Dim sayi4 As Integer
Dim sayi5 As Integer
Dim sayi6 As Integer
sayi1 = Val(Text1.Text)
sayi2 = Val(Text2.Text)
sayi3 = Val(Text3.Text)
sayi4 = Val(Text4.Text)
sayi5 = Val(Text5.Text)
sayi6 = Val(Text6.Text)
Select Case List1.ListIndex
Case o
ort = (sayi1 + sayi2 + sayi4) / 3
Case 1
ort = (sayi1 + sayi2 + sayi4 + sayi5) / 4
Case 2
ort = (sayi1 + sayi2 + sayi3 + sayi4 + sayi5) / 5
Case 3
ort = (sayi1 + sayi2 + sayi3 + sayi4 + sayi5 + sayi6) / 6
End Select
Label8.Caption = ort
End Sub
Private Sub Form_Load()
List1.AddItem "2 sınav 1sözlü"
List1.AddItem "2 sınav 2 sözlü"
List1.AddItem "3 sınav 2 sözlü"
List1.AddItem "3 sınav 3 sözlü"
End Sub
Private Sub List1_Click()
Select Case List1.ListIndex
Case 0
Label1.Visible = True
Text1.Visible = True
Label2.Visible = True
Text2.Visible = True
Label3.Visible = False
Text3.Visible = False
Label4.Visible = True
Text4.Visible = True
Label5.Visible = False
Text5.Visible = False
Label6.Visible = False
Text6.Visible = False
Case 1
Label1.Visible = True
Text1.Visible = True
Label2.Visible = True
Text2.Visible = True
Label3.Visible = False
Text3.Visible = False
Label4.Visible = True
Text4.Visible = True
Label5.Visible = True
Text5.Visible = True
Label6.Visible = False
Text6.Visible = False
Case 2
Label1.Visible = True
Text1.Visible = True
Label2.Visible = True
Text2.Visible = True
Label3.Visible = True
Text3.Visible = True
Label4.Visible = True
Text4.Visible = True
Label5.Visible = True
Text5.Visible = True
Label6.Visible = False
Text6.Visible = False
Case 3
Label1.Visible = True
Text1.Visible = True
Label2.Visible = True
Text2.Visible = True
Label3.Visible = True
Text3.Visible = True
Label4.Visible = True
Text4.Visible = True
Label5.Visible = True
Text5.Visible = True
Label6.Visible = True
Text6.Visible = True
End Select
End Sub