Click here to Skip to main content
15,920,801 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Create listbox based on contents of table Pin
mr_1234518-Apr-06 16:46
mr_1234518-Apr-06 16:46 
GeneralRe: Create listbox based on contents of table Pin
penguin500018-Apr-06 19:17
penguin500018-Apr-06 19:17 
QuestionUnique ramdomized numbers Pin
Solid Snake18-Apr-06 10:47
Solid Snake18-Apr-06 10:47 
AnswerRe: Unique ramdomized numbers Pin
Guffa18-Apr-06 12:56
Guffa18-Apr-06 12:56 
GeneralRe: Unique ramdomized numbers Pin
Solid Snake18-Apr-06 13:07
Solid Snake18-Apr-06 13:07 
AnswerRe: Unique ramdomized numbers Pin
Guffa19-Apr-06 2:24
Guffa19-Apr-06 2:24 
GeneralRe: Unique ramdomized numbers Pin
Solid Snake19-Apr-06 12:48
Solid Snake19-Apr-06 12:48 
AnswerRe: Unique ramdomized numbers Pin
Guffa20-Apr-06 7:16
Guffa20-Apr-06 7:16 
A random number is just a floating point number between 0.0 and 1.0. There is no code that prohibits certain ranges for a random number. You have to take that whole range and distribute it equally over the possible numbers.

If all numbers are used except 1, 4, 6 and 7, you distribute the random number range equally over those four numbers:

0.00 <= Rnd < 0.25 --> 1
0.25 <= Rnd < 0.50 --> 4
0.50 <= Rnd < 0.75 --> 6
0.75 <= Rnd < 1.00 --> 7

The easiest way of doing that is of course to pick a random number between 0 and 3, and translate to the available numbers.

---
b { font-weight: normal; }

QuestionInternet Connection Status Pin
Devraj Raut18-Apr-06 10:12
Devraj Raut18-Apr-06 10:12 
AnswerRe: Internet Connection Status Pin
mr_1234518-Apr-06 13:13
mr_1234518-Apr-06 13:13 
GeneralRe: Internet Connection Status Pin
Devraj Raut18-Apr-06 22:25
Devraj Raut18-Apr-06 22:25 
QuestionDivisors Pin
Heart_Flame18-Apr-06 9:37
Heart_Flame18-Apr-06 9:37 
AnswerRe: Divisors Pin
Guffa18-Apr-06 10:08
Guffa18-Apr-06 10:08 
QuestionRe: Divisors Pin
Heart_Flame20-Apr-06 8:45
Heart_Flame20-Apr-06 8:45 
QuestionRegister Channel in WinXP SP2 Pin
Ali el18-Apr-06 8:56
Ali el18-Apr-06 8:56 
QuestionMsComm Buffer Pin
arunendra18-Apr-06 7:14
arunendra18-Apr-06 7:14 
AnswerRe: MsComm Buffer Pin
arunendra19-Apr-06 6:59
arunendra19-Apr-06 6:59 
QuestionComponentOne FlexGrid Pin
chitradash18-Apr-06 5:44
chitradash18-Apr-06 5:44 
AnswerRe: ComponentOne FlexGrid Pin
Suelinda_W1-Jun-06 8:23
Suelinda_W1-Jun-06 8:23 
Questionhow Pin
Mr kilany18-Apr-06 3:56
Mr kilany18-Apr-06 3:56 
QuestionMS Office Small Bus Accounting 2006 Pin
machman118-Apr-06 2:37
machman118-Apr-06 2:37 
QuestionRegarding Deploying a web application Pin
Vijaya Krishnamoorthy18-Apr-06 2:02
Vijaya Krishnamoorthy18-Apr-06 2:02 
Questionformatting of a word document with vb.net Pin
Keith Milburn18-Apr-06 1:53
Keith Milburn18-Apr-06 1:53 
QuestionTimer in vb.net Pin
pankajgarg1218-Apr-06 1:00
pankajgarg1218-Apr-06 1:00 
AnswerRe: Timer in vb.net Pin
Guffa18-Apr-06 1:16
Guffa18-Apr-06 1:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.