* New post Constructor Destructor and Inheritance& Array , Virtual base class in c++ language

Sunday, 17 March 2013

0 how to create math function in vb.net

How to create math function in vb.net



Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox1.Text = Math.Sqrt(Int(TextBox2.Text))
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim A As Decimal
        A = TextBox1.Text
        TextBox1.Text = Math.Round(A)
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        TextBox1.Text = Math.Max(Val(TextBox1.Text), Val(TextBox2.Text))
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        TextBox1.Text = Math.Min(Val(TextBox1.Text), Val(TextBox2.Text))
    End Sub

  
End Class

0 comments:

Post a Comment

 

PROGRAMMINGqueen Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates

Blogger Widgets