by Labuneba (2 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 16th March 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Simple program that deletes any file on your computer. this uses the simple code. the code which deletes the file is kill ("file path"). try
API Declarations
'you need one form
'one command button
'one drive list
'one folder list
'one file list
'one label
On Error GoTo ERROR1
Dim Message As Integer
Message = MsgBox("Are you sure you want to delete " & Label1.Caption & "?", vbYesNo + vbQuestion + vbSystemModal, "Delete?")
If Message = vbYes Then
Kill Label1.Caption
Message = MsgBox("File deleted succesfully!", vbOKOnly + vbSystemModal + vbInformation, "Deleted")
File1.Refresh
End If
Exit Sub
ERROR1:
Dim ERRORMSG As Integer
ERRORMSG = MsgBox("Errors while deleting the file!!!", vbOKOnly + vbSystemModal + vbCritical, "ERROR")
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
Label1.Caption = File1.Path & "\" & File1.FileName
Label1.ToolTipText = Label1.Caption
End Sub
No comments have been posted about Simple program that deletes any file on your computer. this uses the simple code. the code which de. Why not be the first to post a comment about Simple program that deletes any file on your computer. this uses the simple code. the code which de.