C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Visual Studio »

Call a function


Posted Date: 15 Oct 2009      Posted By: miss tina      Member Level: Bronze     Points: 1   Responses: 2



I made a function in vb 6 of randomly generate the number 1 to 10 now how I call this function on form load. On form load event the function displayed all 10 number on 10 textbox on the form how I display these 10 random number in text boxes


Private Sub N_Integers(N As Integer, rndlist() As Integer)
Randomize
Dim I As Integer, J As Integer, T As Integer
For I = 1 To N
rndlist(I) = I
Next I
'J is number of integers remaining
For J = N To 2 Step -1
I = Int(Rnd * J) + 1
T = rndlist(J)
rndlist(J) = rndlist(I)
rndlist(I) = T
Next J
End Sub





Responses

Author: seema    15 Oct 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

on pageload()
{N_Integers()
}



Author: Kunal    15 Oct 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

on pageload()
{N_Integers()
}

Happy Programming
Kunal
Don't forget to rate the response...



Post Reply
You must Sign In to post a response.
Next : Please show me the code to insert data from textboxes to datagridview
Previous : The code to insert the textbox datas to datagridview
Return to Discussion Forum
Post New Message
Category: Visual Studio

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use