Username Password

Register Here || Lost Password
View Thread
Explore Your Brain » Pemrograman » Out Of Topic Programing
coding untuk mengosongkan recyclebin dari vb
Username
Password
Register FAQ Members List Today's Posts Search

Print Thread

08-07-2008 09:22 AM coding untuk mengosongkan recyclebin ...
User Avatar

chandra_rock22
Chunnin Senior


Posts: 111
Joined: 08.07.08
Location: Medan, Sumatra Utara
Age: 30
Pengen bikin program sendiri buat ngehapus file-file yang ada di recycle bin? jangan tanya ya, ini sekedar share aja..
Ketikan code ini pada Module
Const SHERB_NOCONFIRMATION = &H1
Const SHERB_NOPROGRESSUI = &H2
Const SHERB_NOSOUND = &H4

Private Type ULARGE_Integer
LowPart As Long
HighPart As Long
End Type

Private Type SHQUERYRBINFO
cbSize As Long
i64Size As ULARGE_Integer
i64NumItems As ULARGE_Integer
End Type

Private Declare Function SHEmptyRecycleBin Lib "shell32.dll" _
Alias "SHEmptyRecycleBinA" (Byval hwnd As Long, _
Byval pszRootPath As String, Byval dwFlags As Long) As Long
Private Declare Function SHUpdateRecycleBinIcon Lib "shell32.dll" () As Long
Private Declare Function SHQueryRecycleBin Lib "shell32.dll" Alias _
"SHQueryRecycleBinA" (Byval pszRootPath As String, _
pSHQueryRBInfo As SHQUERYRBINFO) As Long

Tambahkan satu buah form, kemudian ketikan koding dibawah, atau copy paste ja langsung :

Private Sub Form_Load()
Dim RBinInfo As SHQUERYRBINFO, Msg As VbMsgBoxResult
RBinInfo.cbSize = Len(RBinInfo)
SHQueryRecycleBin vbnullString, RBinInfo
Msg = MsgBox("Kosongkan Recycle Bin?", vbYesNo + vbQuestion)
If Msg = vbYes Then
SHEmptyRecycleBin Me.hwnd, vbnullString, 0
SHUpdateRecycleBinIcon
End If
End Sub
 
Offline
08-07-2008 10:21 AM RE: coding untuk mengosongkan recyclebin ...
User Avatar

EVA-00
HackAge


Posts: 2770
Joined: 21.05.08
Location: Wallahu a'lam
Age: 33
thanks bgt untuk sharing VBnya bro...kirim lagi tipstips yg banyak ya. artikelnya blm gw coba (vbnya blm di install Pfft ).
Nabi Muhammad SAW bersabda :” Barangsiapa Yang Mengamalkan Ilmu Yang Ia Ketahui Maka Allah Akan Memberikan Kepadanya Ilmu Yang Belum Ia Ketahui” (HR. Imam Ahmad).

..::shn6 u!vJq Jnoh 3Joldx3 d33>I::..
 
Offline
23-09-2008 04:15 PM RE: coding untuk mengosongkan recyclebin ...
User Avatar

udahjadi
Jounin Spesial


Posts: 220
Joined: 29.08.08
Location: JakTOWN®
Age: 39
thanxs bro... di coba dulu ah... ^_^Grin
Newbie™
Merdeka Indonesia...Maju terus...!!!
jangan mau kalah dari negara lain !!!
 
Offline
Jump to Forum:
Forum powered by fusionBoard
Share this Thread
URL:
BBcode:
HTML:
Similar Threads
Thread Forum Replies Last Post
Salam dari kota solo Absen Member baru 5 02-03-2017 16:12
Cara Untuk Menjadi Kepribadian Yang Dewasa Out Of Topic 1 30-01-2014 21:53
(ask) mohon Bantuan kepada teman2 untuk Crack Software CCBoot V3.0 Software 2 23-10-2013 08:17
mulai dari mana..? PHP 7 04-07-2013 14:14
Seminar dan Demo IPv6 untuk IntraNet (GRATIS !!) Info Seminar, Event, Pameran, Etc 1 29-04-2013 21:54
Copyright © 2007-2016