İKİ DAKİKA GÜNCEL HABER MERKEZİ
Giriş Sayfanız Yapın  İKİ DAKİKA DA HER ŞEYDEN HABERDAR OLUN!    Sık Kullanılanlara Ekleyin
Değişken Sorma
Yazar jawscod2
Programın çalışması için 2 adet TextBox, 4 adet Command buton 1 adet Label gerekmektedir.
Dim s(25) As String
Dim cnt As Byte
Dim x As Integer
Dim cont As Boolean
Sub bul(a As String)
Dim f, d As String
cont = False
For x = 0 To cnt
f = Mid$(s(x), 1, Len(a))
If f = a Then
d = Right$(s(x), Len(s(x)) - Len(a))
cont = True
End If
Next
Label1.Caption = d
If cont = True And d = “” Then Label1.Caption = “”
End Sub
Sub bul2(a As String)
Dim f, d As String
For x = 1 To Len(a)
f = Mid$(a, x, 1)
If f = “=” Then d = Left$(a, x)
Next
bul (d)
End Sub
Sub deg()
Dim y As Integer
Dim f, d As String
For x = 0 To cnt
For y = 1 To Len(s(x))
f = Mid$(s(x), y, 1)
If f = “=” Then
d = Left$(s(x), y - 1)
MsgBox d, , “Değişkenler”
End If
Next
Next
End Sub
Private Sub Command1_Click()
bul2 (Text1.Text)
If cont = False Then
If cnt < 25 Then
s(cnt) = Text1.Text
cnt = cnt + 1
Form1.Caption = “Değişken Sorma ” & CStr(cnt) & “/25″
Else
MsgBox “Değişken İçin Yer YOK!!!”
End If
Else
MsgBox “Bu değişken Zaten Var!!!”
End If
End Sub
Private Sub Command2_Click()
bul (Text2.Text)
If cont = False Then Label1.Caption = “Değişken Bulunamadı!!!”
End Sub
Private Sub Command3_Click()
deg
If s(0) = “” Then MsgBox “Değişken Bulunamadı!!!”, , “Değişkenler”
End Sub
Private Sub Command4_Click()
Dim f, g As String
For x = 0 To cnt
f = s(x)
If f “” Then g = g + f + vbNewLine
Next
If g “” Then
MsgBox g, , “Yığın”
Else
MsgBox “Yığın Boş”, , “Yığın”
End If
End Sub
Private Sub Form_Load()
Command1.Caption=”Ekle”
Command2.Caption=”Sor”
Command3.Caption=”Bul”
Command4.Caption=”Yığın”
Text1.Text=”A=”
Text2.Text=”A=”
Label1.Caption=”"
Form1.Caption = “Değişken Sorma 0/25″
End Sub
Bu yazı toplamda 38, bugün ise 0 kez görüntülenmiş
Bu konularda ilginizi çekebilir
Aradığınız konu hakkında yeterli içeriği sitemizde bulamadıysanız, aşağıdaki kutucuklardan google ve yahoo arama motorlarında arama yapabilirsiniz.
Yorum
Ayarlar
-
Şubat 12, 2008
-
Teknoloji
-
Yorum yapılmamış
-
RSS Yorumları
-
Del.ico.us
-
Digg!



