Jump to content


Check out our Community Blogs

Zayfox

Member Since 24 Dec 2007
Offline Last Active Sep 12 2017 11:40 AM
-----

Topics I've Started

[.NET 2008] Random output

03 March 2009 - 03:11 AM

I was creating a program a while back that randomized a number on a button click, then depending on the number, showed a different comment. I tried to recreate the program recently and I can't find a way to link the two events:
Private Sub btnGen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGen.Click
        Dim RandomClass As New Random
        Dim RandomNumber As String
        RandomNumber = RandomClass.Next(1, 11)
        Select Case RandomNumber.
            Case RandomNumber = "1"
                txtquote.Text = "Quote 1"
            Case RandomNumber = "2"
                txtquote.Text = "Quote 2"
            Case RandomNumber = "3"
                txtquote.Text = "Quote 3"
            Case RandomNumber = "4"
                txtquote.Text = "Quote 4"
            Case RandomNumber = "5"
                txtquote.Text = "Quote 5"
            Case RandomNumber = "6"
                txtquote.Text = "Quote 6"
            Case RandomNumber = "7"
                txtquote.Text = "Quote 7"
            Case RandomNumber = "8"
                txtquote.Text = "Quote 8"
            Case RandomNumber = "9"
                txtquote.Text = "Quote 9"
            Case RandomNumber = "10"
                txtquote.Text = "Quote 10"
        End Select
    End Sub
The only problem is, when I click the button the textbox doesn't actually produce anything. What's going on?

[c#.net 2008 sp1] massive request!

06 September 2008 - 09:27 PM

At the moment, it's 3:26PM. Which means for 4 hours I have been searching for a Battle.Net bot source code in C#. All I found was something called JiNX bot which had an error that was rather unfixable.

I want to create my own bot, either by learning from the source of another, or by help from other members of this forum. PLEASE HELP ME OUT!:(

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download