• 03-05-2014, 19:38:22
    #1
    Merhabalar, değerli hocalarım vbscript üzerinden hesap makinesi yapıyorum ancak bazı işlemler hatalı çıkıyor; girdiğim ikinci sayının 2 katını buluyor, toplama işlemi yaptığım halde. Bazı işlemler de doğru çıkartıyor.


    Kodları İndir

    (Virüs Total)
  • 04-05-2014, 01:47:56
    #2
    Üyeliği durduruldu
    Sub bir()
            If TextBox1.Text = "" Then
                TextBox1.Text = "1"
            Else
                TextBox1.Text = TextBox1.Text + "1"
                TextBox2.Text = Val(TextBox1.Text)
            
            End If
        End Sub
    
    
        Sub iki()
            If TextBox1.Text = "" Then
                TextBox1.Text = "2"
            Else
                TextBox1.Text = TextBox1.Text + "2"
                TextBox2.Text = Val(TextBox1.Text)
              
            End If
        End Sub
    
    
        Sub uc()
            If TextBox1.Text = "" Then
                TextBox1.Text = "3"
            Else
                TextBox1.Text = TextBox1.Text + "3"
                TextBox2.Text = Val(TextBox1.Text)
            End If
        End Sub
    
    
        Sub dort()
            If TextBox1.Text = "" Then
                TextBox1.Text = "4"
            Else
                TextBox1.Text = TextBox1.Text + "4"
                TextBox2.Text = Val(TextBox1.Text)
            End If
        End Sub
    
    
        Sub bes()
            If TextBox1.Text = "" Then
                TextBox1.Text = "5"
            Else
                TextBox1.Text = TextBox1.Text + "5"
                TextBox2.Text = Val(TextBox1.Text)
            End If
        End Sub
    
    
        Sub alti()
            If TextBox1.Text = "" Then
                TextBox1.Text = "6"
            Else
                TextBox1.Text = TextBox1.Text + "6"
                TextBox2.Text = Val(TextBox1.Text)
            End If
        End Sub
    
    
        Sub yedi()
            If TextBox1.Text = "" Then
                TextBox1.Text = "7"
            Else
                TextBox1.Text = TextBox1.Text + "7"
                TextBox2.Text = Val(TextBox1.Text)
            End If
        End Sub
    
    
        Sub sekiz()
            If TextBox1.Text = "" Then
                TextBox1.Text = "8"
            Else
                TextBox1.Text = TextBox1.Text + "8"
                TextBox2.Text = Val(TextBox1.Text)
            End If
        End Sub
    
    
        Sub dokuz()
            If TextBox1.Text = "" Then
                TextBox1.Text = "9"
            Else
                TextBox1.Text = TextBox1.Text + "9"
                TextBox2.Text = Val(TextBox1.Text)
            End If
        End Sub
    
    
        Sub sifir()
            If TextBox1.Text = "" Then
                TextBox1.Text = "0"
            Else
                TextBox1.Text = TextBox1.Text + "0"
            End If
        End Sub
    
    
        Sub nokta()
            if TextBox1.Text = "" Then
             
            Else
             TextBox1.Text = TextBox1.Text + "."
             End if
        End Sub
    bu kodları yazmandaki amaç nedir
  • 04-05-2014, 07:20:30
    #3
    Bunları butonların onClick olayına ekledim her tuş için. Biz alt programları böyle öğrendik hocam.

    // Güncell. // Proje ödevim zamanım az sorunu bulamadım