vb.net empty trash

  • Thread starter Thread starter victor
  • Start date Start date
V

victor

Hey

How can i emtpy the Windows trash can (i don't know the english word)
with vb.net?

thanks

Victor
 
Hi,

API declare
<DllImport("shell32.dll", entrypoint:="SHEmptyRecycleBinA", _

setlasterror:=True, CharSet:=CharSet.Ansi, exactspelling:=True, _

CallingConvention:=CallingConvention.StdCall)> _

Public Shared Function SHEmptyRecycleBin(ByVal hWnd As IntPtr, _

ByVal lpszRootPath As String, ByVal dwFlags As Integer) As Integer

End Function



Constants



Private Const SHERB_NOCONFIRMATION As Integer = &H1



Example



SHEmptyRecycleBin(Me.Handle, Nothing, SHERB_NOCONFIRMATION)



Ken

----------------------------

Hey

How can i emtpy the Windows trash can (i don't know the english word)
with vb.net?

thanks

Victor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top