Showing posts with label clear recent file. Show all posts
Showing posts with label clear recent file. Show all posts

Saturday, October 3, 2009

Clear Recent File(s)



Oke, dengan vb kita bisa membersihkan daftar file-file yang kita buka. Karena windows secara default menyimpan daftar file tsb. kalo kita klik start>Documents, maka akan tampil semua file yang udah kita buka.

kalo mau delete...ngapain cape-cape, nih kode vb-nya...


Private Declare Sub SHAddToRecentDocs Lib "shell32.dll" _
(ByVal uFlags As Long, ByVal PV As String)


Private Sub Command1_Click()
   ClearDocumentsMenu
   MsgBox "Sudah ter-hapus"
   End
End Sub

Public Function ClearDocumentsMenu() As Boolean
   'Returns true if successful, false otherwise
   SHAddToRecentDocs 2, vbNullString
   ClearDocumentsMenu = Err.LastDllError = 0
End Function


Selamat mencoba!