|
-
Jun 23rd, 2001, 09:03 PM
#1
Drawing a random folder
Ok, I need help figuring out how to draw a random folder from the C drive, and then storing it to a variable, any ideas?
-
Jun 23rd, 2001, 09:09 PM
#2
I would say...first get ALL folder into an array...
the do a count and random draw from the array.
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jun 23rd, 2001, 09:13 PM
#3
add a DirListBox to your folder, set the visible prop to False, add a command button, and this code :
VB Code:
Private Sub Command1_Click()
Randomize Timer
Dir1.Path = "C:\"
x = Int((Dir1.ListCount-1) * Rnd)
MsgBox Dir1.List(x)
End Sub
That would be easiest
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jun 23rd, 2001, 09:14 PM
#4
ok...fine..so that would work too 
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jun 23rd, 2001, 09:15 PM
#5
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
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
|