Jump to content

cbox


Recommended Posts

Posted (edited)

VB.net

 

Use this code to generate random ascii chars, (CODE BY SLIPSTREAM)

 

Dim Random As New Random()
  TextBox1.Text = Chr(Random.Next(65, 90)) & Chr(Random.Next(65, 90)) & Chr(Random.Next(65, 90)) & Chr(Random.Next(65, 90))

And etc...

Edited by ixGAMEOVERxixx
Posted

One thing you can merge multiple declarations if its the same type.

 

Dim RandomNumber1, RandomNumber2, RandomNumber3, RandomNumber4 As Integer

 

 

Maybe you can directly put the RandomClass.Next in the Chr instead of the variable you made, not sure though.

Posted (edited)

:S

 

VB.NET
  
  Dim Random As New Random()
  TextBox1.Text = Chr(Random.Next(65, 90)) & Chr(Random.Next(65, 90)) & Chr(Random.Next(65, 90)) & Chr(Random.Next(65, 90))

 

C#

 Random Rnd = new Random();
  TextBox1.Text = Convert.ToString(Chr(Random.Next(65, 90)) & Chr(Random.Next(65, 90)) & Chr(Random.Next(65, 90)) & Chr(Random.Next(65, 90)));

Edited by Dark Slipstream

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...