Click here to Skip to main content
13,048,337 members (113,654 online)
Rate this:
Please Sign up or sign in to vote.
I am working with one lotery software.I have generated random numbers from 0 to 4000.It displays 100 selected numbers also.

The issue is,i have to develop such that random numbers should be showing on the top of the window. Please have a look at[^].

Only the difference between this link and my requirement is that,i want one button below the numbers,when i press that button,the number at that time will get selected.

I almost completed everything and its working well too.Only the problem is with showing number rotator.

Any help is appreciated.
Posted 4-Jun-13 21:27pm
Updated 5-Jun-13 18:11pm
CPallini 5-Jun-13 4:25am
I don't understand what is exactly your problem. Cannot you show the numbers and, below the number, the button?
Sejal Rabari 5-Jun-13 4:44am
I want to generate random numbers.and display them in a gridview. Till now,when i start the software and start generating numbers,it displays randomly selected 100 numbers directly,thats fine.But now,i want something like counter(like we can see in casino),that everyone can see random numbers are going on.There will be one button also below this visual counter,so suppose i click the button then the number in the counter at the time i pressed the button also get selected.
Sejal Rabari 5-Jun-13 4:56am
Please have a look at this link Rotator.set scroll duration=10,frame duration=50. And think of digits instead of images there.
Ezra Neil 6-Jun-13 2:01am
I would think this can be achieved easily using WPF if you have the choice. I'm not that well versed in WPF so I cant really provide more help but it is something you can look into.
Sunasara Imdadhusen 6-Jun-13 2:24am
Hello Sejal, Could you please provide your code snippet so we can help you to resolve the issue
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There is nothing hard to do. All you need to do is to generate random numbers in separate thread.

Draw a continuous graph in a separate thread in VB .NET[^]
Random number generator - counter[^]

More about threading...
Creating Threads and Passing Data at Start Time[^]
Thread Class[^]
Threading Tutorial[^]

Please, try.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Follow this instructions and you will have 100% success.

Go to visual studio and create

1.Label which will show the random number
2.Button which when it is pressed the random number appears to the label
3.Numeric up-down which you will give the biggest number that will be drawn.

When you create all these on the designer of the form double-click the button and paste the following code(visual basic code):

Label1.Text = CStr(Int(Rnd() * NumericUpDown.Value)) 

If you have any problem tell me
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

you can use a timer, that makes appearing number while you genarate the final ones ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 9 Jun 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100