日期:2014-05-18  浏览次数:21189 次

【200分】请教大家如何在Winform实现类似“摇奖机”的程序,帮顶有分 谢谢
现在有一个datatable,里面有N条数据,希望能实现像娱乐节目里“随机抽选手机号码中奖”的程序,有几点要求:

1-点BUTTON开始抽奖,数据随机的在label(或其它控件)里滚动显示。(关键是要能看到翻动的过程)

2-再次点BUTTON滚动停止,label(或其它控件)里显示被选中的数据。
3-最好有代码

小弟初学,再次感谢帮忙喝帮顶的朋友。!!

------解决方案--------------------
友情UP一下
------解决方案--------------------
一大早帮顶一下吧。
------解决方案--------------------

先赚点分 up下
------解决方案--------------------
mark
------解决方案--------------------
从数据库中获取号码
根据号码显示数字图片
翻转图片
------解决方案--------------------
设个for循环或是定时器控件,这个应该不难吧。
------解决方案--------------------
uppp
------解决方案--------------------
这个程序需要用到多线程,当时用2003做了一个,要是用2005会麻烦一点
------解决方案--------------------
帮顶了
------解决方案--------------------
bang ding le
------解决方案--------------------
我想这个要写一个无限循环来作,在访问数据库的时候,一条一条的读取数据
------解决方案--------------------
这只是我个人认为
------解决方案--------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN " "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

<html>

<head>
<title> 摇奖器 </title>
<script type= "text/javascript ">
<!--
function init(){
document.forms[0].elements[0].value=parseInt(Math.random()*36+1);
document.forms[0].elements[1].value=parseInt(Math.random()*36+1);
document.forms[0].elements[2].value=parseInt(Math.random()*36+1);
document.forms[0].elements[3].value=parseInt(Math.random()*36+1);
document.forms[0].elements[4].value=parseInt(Math.random()*36+1);
document.forms[0].elements[5].value=parseInt(Math.random()*36+1);
document.forms[0].elements[6].value=parseInt(Math.random()*36+1);
timer1=setTimeout( "init() ",0);}
//-->
</script>
</head>

<body>
<center>
<h1 align= "center "> 随机号码(1—36) </h1>

<form align= "center ">
<p> <input type= "text " size= "1 "> <input type= "text " size= "1 "> <input type= "text " size= "1 "> <input type= "text " size= "1 "> <input type= "text " size= "1 "> <input type= "text " size= "1 "> <input type= "text " size= "1 "> <br>
<input type= "button " value= " 开 始 " OnClick= "init() "> <input type= "button "
value= " 停 止 " OnClick= "clearTimeout(timer1) "> </p>
</form>

<p align= "center ">    </p>
</center>
</body>
</html>