File Deleter Program


File Deleter, as the name suggests, helps delete any file permanently from your computer. The files deleted using this software are not sent to Recycle Bin! So be careful using the software! Though this program uses an old approach i.e using DriveListBox, DirListBox and FileListBox, to access drives, folders and files, it is an interesting application. The splash screen makes the program visually attractive. You'll learn to make splash screen with this sample. The main window appears after the splash screen stays visible for 3 seconds. So download it to learn something new!



                                          >> DOWNLOAD 



Screenshot:

 

File Deleter program screenshot





Code:

'in frmMain 

Private Sub cmdDeleteFile_Click()
    'setting the file location
    If File1.FileName <> "" Then
        If Right(File1.Path, 1) <> "\" Then
            s = File1.Path + "\" + File1.FileName
            Kill (s)
            MsgBox "File deleted successfully", vbInformation, "FileDelete"
        Else
            s = File1.Path + File1.FileName
            Kill (s)
            MsgBox "File deleted successfully", vbInformation, "FileDelete"
  
        End If
    Else
        MsgBox "Please select a file", vbExclamation
    End If


    File1.Refresh
    If File1.ListCount <> 0 Then
        File1.ListIndex = 0
    End If

End Sub
_______________________________________________________
Private Sub cmdExit_Click()
    End
End Sub

_______________________________________________________
Private Sub Dir1_Change()
    File1.Path = Dir1.Path
        If File1.ListCount <> 0 Then
            File1.ListIndex = 0
        End If
End Sub
_______________________________________________________
Private Sub Drive1_Change()
    Dir1.Path = Drive1.Drive
End Sub



'in frmSplash
 
Private Sub Timer1_Timer()
    frmMain.Show
    Unload Me
End Sub