Taksitli satış Programı 'Belki o kadar iyi değil ama yinede taksitlendirme yapabiliyor.

Forma bir tane list box ekledim kopyalayarak 10 tane listbox oluşturdum 10 tane butonumuz,yine kopyalayarak 11 tane checkbox (buna ayları yazıyosunuz),13 tane label,11 tane text box yine kopyaayarak malzemeler bu kadar

aşağıdaki kod form bolumune yazılacak
--------------------------------------------------------------------------------


Private Sub Command1_Click(Index As Integer)
Dim i
For i = 0 To 9
List1(i).AddItem Text1(i)
Next
Text1(0).SetFocus
Label12 = List1(0).ListCount

End Sub

Private Sub Command10_Click(Index As Integer)
Dim i
For i = 0 To 9
List1(i).List(List1(i).ListIndex) = CVar(Text1(i).Text)
Next

End Sub


Private Sub Command2_Click()
Dim cevap, i, j, bulundu
cevap = InputBox("Bulmak istediğiniz kaydı giriniz", "Kayıt arama", List1(0).List(0), 0, 0)
For i = 0 To List1(0).ListCount - 1
If Trim(UCase(cevap)) = Trim(UCase(List1(0).List(i))) Then
bulundu = i
MsgBox "Aranan kayıt bulundu"
For j = 0 To 9
List1(j).ListIndex = bulundu
List1(j).TopIndex = bulundu
Text1(i).Text = List1(i).Text
Next
Exit For
End If
Next
End Sub

Private Sub Command3_Click()
Dim cevap, secind, i
Dim Index As Integer
secind = List1(Index).ListIndex
If secind < 0 Then
MsgBox ("Silinecek elemanı seciniz")
Else
cevap = MsgBox("Elemanı silmek istediğinizden eminmisiniz?", vbYesNo + vbQuestion + vbDefaultButton1 + vbApplicationModal, "Kayıt silinecek")
If cevap = vbYes Then
For i = 0 To 9
List1(i).RemoveItem List1(i).ListIndex
Text1(i) = ""
Next
Label12 = List1(0).ListCount
End If
End If

End Sub

Private Sub Command4_Click()
Dim secilen, elemansay
Dim i, j, k, l
elemansay = List1(0).ListCount
Static dizi(0 To 1000, 0 To 1000)
Dim cevap
cevap = MsgBox("Araya eleman eklemek istediğinizden eminmisiniz", vbYesNo + vbQuestion + vbDefaultButton1 + vbApplicationModal, "Programdan Cıkış")
If cevap = vbYesNo Then Exit Sub
For i = 0 To List1(0).ListCount - 1
If List1(0).Selected(i) Then secilen = i
Next
For k = 0 To secilen - 1
For l = 0 To 9
dizi(k, l) = List1(1).List(k)
Next
Next
For j = secilen To elemansay - 1
For l = 0 To 9
dizi(j, l) = List1(1).List(j)
Next
Next
For l = 0 To 9
List1(1).Clear
Next
For k = 0 To 9
List1(1).AddItem dizi(k, l)
Next

For i = 0 To 9
List1(i).AddItem Text1(i)
Next
For j = secilen To elemansay - 1
For l = 0 To 9
List1(1).AddItem dizi(j, l)
Next
Next
Text1(0).SetFocus
Label12 = List1(0).ListCount
End Sub



Private Sub Command6_Click(Index As Integer)
Dim cevap1, cevap2
cevap1 = MsgBox("Cıkmak istediğinize eminmisiniz?", vbYesNo + vbQuestion + vbDefaultButton1 + vbApplicationModal, "Programdan cıkış")
If cevap1 = vbYes Then
cevap2 = MsgBox("Değişiklikleri kaydedecek misiniz?", vbYesNo + vbQuestion + vbDefaultButton1 + vbApplicationModal, "Programdan cıkış")
If cevap2 = vbYes Then
Dim i, j
For i = 0 To List1(0).ListCount - 1
For j = 0 To 9
taksatis.tak(j) = CVar(List1(j).List(i))
Next
Put #1, i + 1, taksatis
kayitsay = kayitsay + 1
Next
Close #1
End
End If
End If

End Sub

Private Sub Command7_Click()
Dim vademik, takmik, fark, topvadelifiyat, i
On Error Resume Next
fark = Val(Text1(2)) - Val(Text1(3))
For i = 1 To Val(Text1(3))
vademik = fark / Val(Text1(4)) * i * text2 / 100 + vademik
Next
topvadelifiyat = vademik + fark
Text1(6) = Format(tpvadelifiyat, "###,###")
takmik = Int(topvadelifiyat / Val(Text1(4)))
Text1(5) = Format(takmik, "###,###")
Text1(9) = Val(Text1(3)) + Val(Format(Text1(6), "#")) - Val(Text1(8))
Label17 = Format(Val(Text1(3)) + Val(Format(Text1(6), "#")), "###,###") & "YTL"

End Sub

Private Sub Command8_Click(Index As Integer)
Dim i
For i = 0 To 9
Text1(i) = ""
Next
Text1(7) = Date
Text1(0).SetFocus

End Sub

Private Sub Command9_Click(Index As Integer)
Close #1
Dim i, j
Open "taksit.dat" For Random As #1 Len = Len(taksatis)
For i = 0 To List1(0).ListCount - 1
For j = 0 To 9
taksatis.tak(j) = CVar(List1(j).List(i))
Next
Put #1, i + 1, taksatis
kayitsay = kayitsay + 1
Next

End Sub

Public Sub SaydamYap(frm As Form, SeffaflikDerecesi As Integer)
Dim stil As Long
stil = GetWindowLong(frm.hwnd, GWL_EXSTYLE)

If (stil And WS_EX_LAYERED) = 0 Then
SetWindowLong frm.hwnd, GWL_EXSTYLE, stil Or WS_EX_LAYERED
SetLayeredWindowAttributes frm.hwnd, 0, SeffaflikDerecesi, LWA_ALPHA
End If

End Sub


Private Sub Form_Load()
Dim i, j
Open "taksit.dat" For Random As #1 Len = Len(taksatis)
kayitsay = LOF(1) / Len(taksatis)
For i = 1 To kayitsay
Get #1, i, taksatis
For j = 0 To 9
List1(j).AddItem taksatis.tak(j)
Next
Next
Label12 = List1(0).ListCount

End Sub
__________________