top of page

The Code

 

 

 

 

Public Class Form76

    '## Maths Functions ##
    '## Built-In Mathematical Functions ##
    '## The VBMath Function returns Random Value between (0 and Variable) ##

    Dim Number1 As Double
    Dim
Number2 As Double
    Dim
RndValue As Double

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

       '## Int(Value) defines Integer of Random Number ##

        Number1 = TextBox1.Text
        RndValue = Int(VBMath.Rnd() * Number1) + 1
       
Label1.Text = RndValue

        '## Assigning Value Label ##
        '## Assigning Variable to Label alternative Formatting  ##

        Number2 = TextBox2.Text
        Label2.Text = Int(VBMath.Rnd() * Number2) + 1

    End Sub

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

       ## Clear TextBox and Labels ##

        TextBox1.Text = ""
       
TextBox2.Text = ""
       
Label1.Text = ""
       
Label2.Text = ""

    End Sub

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

        Form73.Show()
        Me.Hide()

    End Sub


End Class

Website Links-173.jpg
bottom of page