¿Cómo hacer que se muevan los nombres de las personas en sorteos aleatorios? (lenguaje VB)
Crea un nuevo proyecto y agrega un control de temporizador, un control de texto y un control de comando.
Simplemente copie el programa a continuación
Private Sub Command1_Click()
Si Command1.Caption = "Iniciar" Entonces
Timer1.Enabled = True
Command1.Caption = "Fin"
Else
Timer1.Enabled = False
Command1.Caption = "Inicio"
Finalizar si
End Sub
Sub privado Form_Load()
Timer1.Interval = 10
Timer1.Enabled = False
Text1.FontSize = 20
End Sub
Private Sub Timer1_Timer()
Atenuar r como entero
r = Int(51 * Rnd 1)
Si r = 1 Entonces k = "谯鲁鲁"
Si r = 2 Entonces k = "黄德青"
Si r = 3 Entonces k = "Wang Hui"
Si r = 4 Entonces k = "Zhang Yi"
Si r = 5 Entonces k = "Jing Ren Ren" p>
Si r = 6 Entonces k = "Gao Lina"
Si r = 7 Entonces k = "Jin Lanlan"
Si r = 8 Entonces k = "Sol Bingxi"
Si r = 9 Entonces k = "Mao Jinfeng"
Si r = 10 Entonces k = "Li Xiaoming"
Si r = 11 Entonces k = "Cui Yichun"
Si r = 12 Entonces k = "Cao Lulu"
Si r = 13 Entonces k = "Liu Mingjin"
Si r = 14 Entonces k = "Zhang Shuping"
Si r = 15 Entonces k = "Chen Yali"
Si r = 16 Entonces k = "Qi Miaomiao"
Si r = 17 Entonces k = "Zhao Mingming"
Si r = 18 Entonces k = "Liu Mingfei"
Si r = 19 Entonces k = "Zhang Bin"
Si r = 20 Entonces k = "Liu Wenheng"
Si r = 21 Entonces k = "Huang Feiyan"
Si r = 22 Entonces k = "Wang Liang" p>
Si r = 23 Entonces k = "Chang Hongkuan"
Si r = 24 Entonces k = "He Yanwei"
Si r = 25 Entonces k = "Yang Pengfei "
Si r = 26 Entonces k = "Chen Deng"
Si r = 27 Entonces k = "Diao Feixiang"
Si r = 28 Entonces k = "Huang Xuewei"
Si r = 29 Entonces k = "陈永杰"
Si r = 30 Entonces k = "Liu Bowen"
Si r = 31
Entonces k = "Wang Zi"
Si r = 32 Entonces k = "Zhang Yawei"
Si r = 33 Entonces k = "Xi Boshuai"
Si r = 34 Entonces k = "Li Yan"
Si r = 35 Entonces k = "Li Cailong"
Si r = 36 Entonces k = "Xia Yangzheng"
Si r = 37 Entonces k = "Zhang Ziyang"
Si r = 38 Entonces k = "Qi Mengfei"
Si r = 39 Entonces k = "Zhang Qiang "
Si r = 40 Entonces k = "李浩强"
Si r = 41 Entonces k = "Guo Xiaofeng"
Si r = 42 Entonces k = "Wang Weibo"
Si r = 43 Entonces k = "Wang Heng"
Si r = 44 Entonces k = "Bixianan"
Si r = 45 Entonces k = "Meng Yangrui "
Si r = 46 Entonces k = "Guo Junpeng"
Si r = 47 Entonces k = "Ma Shilin"
Si r = 48 Entonces k = "Hou Biao"
Si r = 49 Entonces k = "Zhu Lei"
Si r = 50 Entonces k = "Zhang Yu"
Si r = 51 Entonces k = "Chang Xiaoyu"
Text1.Text = k
End Sub