473,569 Members | 2,721 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 1999
Hi,

API declare
<DllImport("she ll32.dll", entrypoint:="SH EmptyRecycleBin A", _

setlasterror:=T rue, CharSet:=CharSe t.Ansi, exactspelling:= True, _

CallingConventi on:=CallingConv ention.StdCall) > _

Public Shared Function SHEmptyRecycleB in(ByVal hWnd As IntPtr, _

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

End Function

Constants

Private Const SHERB_NOCONFIRM ATION As Integer = &H1

Example

SHEmptyRecycleB in(Me.Handle, Nothing, SHERB_NOCONFIRM ATION)

Ken

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

"victor" <ik@rebels.co m> 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
3385
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 <foo/>) From XHTML specification:
12
17086
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. This is okay in some cases (such as <tbody>), but problematic for other tags (such as <option>). Some tags (td, th, ...) do not produce warnings when...
2
26633
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 empty elements in the XML. How to do that ? I don't understand why there is no simple option to specify the output format, or did I miss something ? ...
0
1000
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 can restore trash files. Thank you for your help in advance. Frank
14
2329
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
1392
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 the left frame, how can I drag that image to the trash so that it is removed from the left frame only?
26
2748
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
1413
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 Macon guymacon Guy Macon Guy Macon Guy Macon guymacon Guy Macon Guy Macon guymacon Guy Macon Guy Macon guymacon Guy Macon Guy Macon Guy Macon guymacon...
0
7695
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5509
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.