VB制作1到50抽奖程序
的有关信息介绍如下:只要在窗体中做二个命令按钮、一个标签和一个定时器对象,复制以下代码,就可以运行了:Private Sub Command1_Click() If Command1.Caption = "开始" Then Command1.Caption = "暂停" Timer1.Enabled = True Else Command1.Caption = "开始" Timer1.Enabled = False End IfEnd SubPrivate Sub Command2_Click() EndEnd SubPrivate Sub Form_Load() Label1.Caption = "" Label1.FontSize = 50 Timer1.Interval = 50 Timer1.Enabled = False Command1.Caption = "开始" Command2.Caption = "结束"End SubPrivate Sub Timer1_Timer() Label1.Caption = Int(Rnd * 50) + 1End Sub