Flash Games

 FAQ   Search   Members   Groups   User Control Panel      Login 

It is currently Fri Dec 05, 2008 3:11 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Loop Code
PostPosted: Tue Jul 15, 2008 2:58 am 
Offline

Joined: Tue Jul 15, 2008 2:46 am
Posts: 1
Hello All,

I am new to VB and I am trying to accomplish a simple task. I want to run through a loop that will generate a random number. After the termination of the loop I want the button to longer be visble. Right now with the code I have if you click the button once, the button disappears. When I debug everything looks fine. Please help. Below is my code.

Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim i As Integer
        For i = 1 To 3
            Form1_Load(sender, e)
        Next
        Button1.Visible = False
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim value As Integer
        value = (Int(Rnd() * 10))
        Label1.Text = value
    End Sub
End Class


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games

Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User:
Pass:
Log me on automatically each visit: