How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7
Go Back  Xtreme Visual Basic Talk > > > How to empty the recycle bin in Xp/Vista/7


Reply
 
Thread Tools Display Modes
  #1  
Old 08-21-2010, 09:58 AM
Deweyspunkis Deweyspunkis is offline
Newcomer
 
Join Date: Aug 2010
Posts: 3
Question How to empty the recycle bin in Xp/Vista/7


Hi. I'm making a cleaning program and one of the things it does is cleans the recycle bin. How do I do it for Xp, Vista, and 7? I'm on Visual Basic 2010. Also, how do I make it so that it automatically finds the username and uses it when the program deletes a folder. Right now I have it so that you need to enter your username in a textbox and then it uses that for the directories. I know it's something with SystemInformation.UserName. Thanks!


P.S. This is my first post here so if I posted this in the wrong section or left out some info, I hope you can understand.

Last edited by Deweyspunkis; 08-21-2010 at 10:30 AM.
Reply With Quote
  #2  
Old 08-21-2010, 10:49 AM
Qua's Avatar
QuaHow to empty the recycle bin in Xp/Vista/7 Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

Environment.UserName or something along those lines will give you the username. As for emptying the recycle bin, .NET provides no API for doing this so you will have to use the windows API for this sort of operations.

The SHEmptyRecycleBin function is properly what you're looking for.
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #3  
Old 08-21-2010, 11:00 AM
Deweyspunkis Deweyspunkis is offline
Newcomer
 
Join Date: Aug 2010
Posts: 3
Default

I'm not really an expert... but how do I use the environment.UserName and yes that's valid but I don't know where to go form there
Reply With Quote
  #4  
Old 08-21-2010, 11:48 AM
Qua's Avatar
QuaHow to empty the recycle bin in Xp/Vista/7 Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

What have you tried so far?
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #5  
Old 08-21-2010, 12:23 PM
Deweyspunkis Deweyspunkis is offline
Newcomer
 
Join Date: Aug 2010
Posts: 3
Default

Quote:
Originally Posted by Qua View Post
What have you tried so far?
Not really anything.... Like I've said I'm not really and expert But i've tried using
Code:
Dim Username = SystemInformation.UserName
Username = SystemInformation.UserName
But then I didn't know where to go from there =/
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7 How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7
 
How to empty the recycle bin in Xp/Vista/7
How to empty the recycle bin in Xp/Vista/7
 
-->