473,503 Members | 12,175 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vb.net empty trash

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
1 1993
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
3376
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to...
12
17077
by: Stefan Weiss | last post by:
Hi. (this is somewhat similar to yesterday's thread about empty links) I noticed that Tidy issues warnings whenever it encounters empty tags, and strips those tags if cleanup was requested....
2
26593
by: Andreas Palm | last post by:
I have a dataset that has DBNull in certain columns, now when I write out this one to XML, I only get the columns as elements that do have data in it. However I do need also the empty colums as...
0
996
by: Frank Meng | last post by:
If I delete a file called "my.doc", I will get a file called "12345.doc" in Recycle Bin. Is there a way for dotnet to find out where the trash file came from? Windows knows that, because Windows...
14
2324
by: cj | last post by:
What is string.empty used for? I can't say: if string.empty then I have to use: if string = "" then which is ok, I just want to know what .empty is for.
2
1386
by: Jungleman | last post by:
This script allows the user to click an image and load it in a different frame. http://www.walterzorn.com/dragdrop/demos/frameset/frame.htm It's pretty cool. Once I have an image loaded in...
26
2734
by: anonieko | last post by:
In the past I always used "" everywhere for empty string in my code without a problem. Now, do you think I should use String.Empty instead of "" (at all times) ? Let me know your thoughts.
1
1405
by: rlm | last post by:
pgp trash troll delete Guy Macon Guy Macon guymacon Guy Macon Guy Macon guymacon Guy Macon Guy Macon guymacon Guy Macon Guy Macon Guy Macon guymacon Guy Macon Guy Macon guymacon Guy Macon Guy...
0
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4992
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.