Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# VB.NET WindowsForms
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 http://dzeyznfiverr.blogspot.in/2013/05/florida-lottery-random-number-picker.html[^].
 
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 22:27pm
Edited 5-Jun-13 19:11pm
v3
Comments
CPallini at 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 at 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 at 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 at 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 at 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
good
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.
  Permalink  
v2
Rate this: bad
good
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
  Permalink  
v2
Rate this: bad
good
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 Wink | ;)
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 190
1 Jochen Arndt 155
2 PIEBALDconsult 150
3 Afzaal Ahmad Zeeshan 120
4 DamithSL 115
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 9 Jun 2013
Copyright © CodeProject, 1999-2014
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