728X90

تطبيق كود الحاسبة

0






Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) 
Handles Button1.Click

        If TextBox1.Text = "" Or TextBox2.Text = "" Then
           ("الرجاء اكمال البيانات ") MsgBox
        Else

            TextBox3.Text = TextBox1.Text * TextBox2.Text
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        If TextBox1.Text = "" Or TextBox2.Text = "" Then
           ("الرجاء اكمال البيانات ") MsgBox
        Else

            (TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text
     
  End If

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

        If TextBox1.Text = "" Or TextBox2.Text = "" Then
           ("الرجاء اكمال البيانات ") MsgBox
        Else

            TextBox3.Text = TextBox1.Text - TextBox2.Text
        End If
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

        If TextBox1.Text = "" Or TextBox2.Text = "" Then
           ("الرجاء اكمال البيانات ") MsgBox
        Else

            If TextBox2.Text = 0 Then

               "لا يقبل القسمة على صفر "=TextBox3.Text 
               () TextBox2.Focus
            Else
                TextBox3.Text = TextBox1.Text / TextBox2.Text
            End If

        End If
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

  "" =   TextBox1.Text
 ""     =  TextBox2.Text 
 ""=        TextBox3.Text 
        ()TextBox1.Focus
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        End
    End Sub
End Class

ليست هناك تعليقات:

إرسال تعليق

جميع الحقوق محفوظة لــ ثانوية خليص تصميم كن مدون