-
Randomizing text from Listbox?
Hi
i have a list box which contains around 20 lines of data, I would like to import each of these into a button in a random order.
Apprantely, the best method is to get a random item from the listbox, using a Random object to generate a random number and use that as an index to get the corresponding item from the list.
Anyone have any idea how to do this?
-
dim rnd as new random
dim index as integer = rnd.next(0,listbox1.items.count)
Similar Threads
-
By lodey in forum VB Classic
Replies: 5
Last Post: 04-05-2005, 02:39 PM
-
By folbabe in forum VB Classic
Replies: 0
Last Post: 08-23-2002, 12:48 PM
-
By folbabe in forum VB Classic
Replies: 1
Last Post: 08-23-2002, 06:41 AM
-
Replies: 3
Last Post: 08-30-2001, 11:45 AM
-
By George Gilbert in forum vb.announcements
Replies: 0
Last Post: 08-19-2001, 11:34 AM
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks