Spin HardDrive
Have you ever had a progressbar or something on your app and you want users to think its doing something really hard.. This will spin your HD so you can get that effect...
Rate Spin HardDrive
(6(6 Vote))
'Note: Place a command button named "Command1" on a form...
Private Sub Command1_Click()
Dim fileblock(60000000) As Byte
'opens a file to output to
Open "c:\windows\temp\tempfile.dat" For Binary As #1
'creates a massive string to write to the file
For i = 1 To 1000000
fileblock(i) = 1
Next i
'this is the loop. it keeps going until the file reaches the size you set in the txtfilesize box
Do Until LOF(1) > txtfilesize
Put #1, , fileblock
DoEvents
Loop
'closes the file
Close #1
'this deletes the file you just made
Kill "c:\windows\temp\tempfile.dat"
End Sub
Spin HardDrive Comments
No comments yet — be the first to post one!
Post a Comment