|
-
Apr 14th, 2014, 12:40 PM
#1
Addicted Member
Re: Selecting Random Button
 Originally Posted by kaliman79912
more like:
Code:
Public arrButton() As Button
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
arrButton = {Button1, Button2, Button3}
End Sub
Private Sub ChangeCaption(sender As System.Object, e As System.EventArgs)
Dim intRnd As New Random
Dim start_1 As Integer = intRnd.Next(1, 16)
arrButton(start_1).Text = "this"
End Sub
very clean. much better than mine.
_____________
Tim
If anyone's answer has helped you, please show your appreciation by rating that answer.
When you get a solution to your issue remember to mark the thread Resolved.
reference links
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|