有没有随机抽奖的软件?
你学哪样语言的?用的什么编译工具?我只会Vs的给你贴一个:C#语言写的winfrom 效果如下后台代码如下using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;using System.Threading; //引入命名空间namespace Rand{public partial class Form1 : Form{public Form1(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){if (button1.Text == "开始"){button1.Text = "停止";timer1.Start();//控制计时器启动}else{button1.Text = "开始";timer1.Stop();//控制计时器结束}}private void timer1_Tick(object sender, EventArgs e){Random rd = new Random();//获取随机数label1.Text = rd.Next(0,100).ToString(); 将0到100内的随机数呈现到界面上}}}控件:Lable: 一个 用于显示结果Button: 用于控制Timer:计时器
vb怎么做一个抽奖的软件?要抽到的记录 不能重复的 随机抽取人名
步骤就是这样:1、新建ppt.2、打开“控件工具箱”, 步骤:菜单 视图>工具栏>控件工具箱。
3、点击控件箱上控件“命令按钮”, 在幻灯片1上画一个命令按钮CommandButton1,4、点击控件箱上控件“标签”,在幻灯片1上画一个一个标签Label。
5、点击“命令按钮CommandButton1”右击鼠标,选“属性”,将CommandButton1的Caption属性设置为"抽奖开始",再如此方法,将Label1的Caption属性设置为空白。
当然在属性中还可以设置字体、颜色等等。
6、点击在CommandButton1控件上右击,选“查看代码”,进入Visual Basic界面,编写代码:Private Sub CommandButton1_Click()Slide1.Label1.Caption = Int(Rnd * 120 + 1)End Sub 这句代码可以意思是“点击命令按钮CommandButton1生成一个1到120之间的随机整数,并把它输出到标签label1”上。
” 还要注意一点,这里编写的VB程序实际上就是“宏”。
很多人把病毒编写为宏,随着用户打开ppt文档,病毒就进入了你的电脑。
所以为了安全,很多人都把宏禁用了。
但是宏如果被禁用了,那么我们刚才编写的程序就不起作用了。
所以我们还应该启用宏,方法是ppt中的工具>选项菜单,“安全性”选项卡,“宏安全性”按钮,在弹出的“安全性”窗口中就可以设置宏的安全级别。
当然这个最好做一个flash 软件 插入ppt....
多少孙子为上神评改名字