⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.vb

📁 模拟彩票系统
💻 VB
字号:

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Label1.Text = "中奖号码产生中……"
        Timer1.Enabled = True


        Button2.Enabled = True

        Button3.Enabled = False


    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Randomize()
        TextBox1.Text = Fix(Rnd() * 40) + 1
        TextBox2.Text = Fix(Rnd() * 40) + 1
        TextBox3.Text = Fix(Rnd() * 40) + 1
        TextBox4.Text = Fix(Rnd() * 40) + 1
        TextBox5.Text = Fix(Rnd() * 40) + 1


    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Static x As Integer = 0

        x = x + 1
        Button1.Enabled = True
        Button2.Enabled = False

        Button3.Enabled = True
        Timer1.Enabled = False
        Label1.Text = "第" & x & "期中奖号码是:"
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        End

    End Sub
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -