Dim Values As New List(Of Integer) For i As Integer = 1 To 25 '值范围 Values.Add(i) Next Dim a,b As Integer a = Values.Count For i As Integer = 1 To 25 '个数 b = Rand.Next(a) e.Form.Controls("Button" & i).Text = Values(b) '填充按钮标题 Values.RemoveAt(b) a = a - 1 Next