Lotery系统(随机数旋转器) [英] Lotery System (Random Number Rotator)

查看:112
本文介绍了Lotery系统(随机数旋转器)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个lotery软件。我已经生成了从0到4000的随机数。它还显示了100个选定的数字。



问题是,我必须开发这样的随机数应该显示在窗口的顶部。请查看 http://dzeyznfiverr.blogspot.in/2013/05 /florida-lottery-random-number-picker.html [ ^ ]。



只有这个链接与我的要求之间的区别在于,我想要一个下面的按钮数字,当我按下那个按钮时,那个时候的数字会被选中。



我几乎完成了一切,而且工作也很好。只有问题在于显示号码旋转器。



任何帮助都表示赞赏。

解决方案

没有什么难做的。您需要做的就是在单独的线程中生成随机数。



在VB .NET中的单独线程中绘制连续图形 [ ^ ]

随机数发生器 - 计数器 [ ^ ]



关于线程的更多信息...

在开始时创建线程和传递数据 [ ^ ]

线程类 [ ^ ]

线程教程 [ ^ ]



请尝试。


按照此说明进行操作,您将获得100成功率。



前往视觉工作室创建



1.Label将显示随机数

2.Button当按下时,随机数出现在标签上

3.Numeric up-down,你将给出最大的数字。



当您在表单设计器上创建所有这些时,双击该按钮并粘贴以下代码(可视基本代码):



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



如果你有什么问题告诉我


你可以使用一个计时器,它会在你最后一个时候出现数字;)

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.

解决方案

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.


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


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


这篇关于Lotery系统(随机数旋转器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆