Search Tools Links Login

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...

Original Author: Wanna-Sk8er


'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 emp empfile.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
'closes the file
Close #1
'this deletes the file you just made
Kill "c:windows emp empfile.dat"
End Sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 81 times


Visual Basic 6


No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.