By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,515 Members | 1,042 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,515 IT Pros & Developers. It's quick & easy.

vb.net empty trash

P: n/a
Hey

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

thanks

Victor
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

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

"victor" <ik@rebels.com> wrote in message
news:41***********************@news.xs4all.nl...
Hey

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

thanks

Victor
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.